Troubleshooting Ubuntu Login Issues: How to Fix Password Input Problems and Access Your System

目次

1. Introduction

Ubuntu is a widely used and highly popular Linux distribution around the world, but issues can sometimes occur when entering a password or attempting to log in. These problems can be particularly stressful for Linux beginners.

This article explains the causes of login-related issues in Ubuntu—such as being unable to type a password or access your account—and provides step-by-step solutions. Even if you are new to Linux, you will find clear instructions and practical tips to help resolve these problems.

This guide is especially useful for users experiencing the following issues:

  • The keyboard does not respond on the login screen.
  • You cannot log in even though the password is correct.
  • You have no idea what is causing the problem or where to start troubleshooting.

By following this article, you will be able to solve password input and login issues in Ubuntu and restore a smooth working environment.

2. Main Causes

There are several possible reasons for password input or login problems in Ubuntu. Here, we categorize the main causes into three groups.

Keyboard Configuration Issues

Keyboard-related settings are one of the most common pitfalls for beginners. Check the following points.

NumLock and CapsLock Settings

  • NumLock
    This key enables numeric input. If it is turned off, numbers cannot be typed. When entering a password that contains numbers on the login screen, make sure NumLock is enabled.
  • CapsLock
    This key enables uppercase input. If it is on, uppercase letters may be entered unexpectedly. Since passwords are case-sensitive, verify the CapsLock status before typing.

Incorrect Keyboard Layout

Ubuntu sets a keyboard layout during installation, but if it is incorrect, the characters you type may not match what appears on the screen.
Example: If you are using a Japanese keyboard but Ubuntu is set to an English layout, symbols such as “@” or “:” will appear in different positions.

User Account Issues

If there is an issue with the Ubuntu user account, logging in may fail even if the correct password is entered.

Account Existence

If the registered user account has been deleted or disabled by mistake, logging in becomes impossible.

User Permission Problems

If privileges such as sudo are not properly assigned, certain operations may be restricted and can affect the login process.

System Configuration Issues

System-level problems may also prevent proper password entry or login.

Wayland Issues

Wayland, the default display server in Ubuntu, may have compatibility issues with certain environments or drivers. This may prevent proper input on the login screen.

Corrupted Configuration Files

System updates or incorrect operations may corrupt essential configuration files. For example, if login-related configuration files are damaged, the system may reject your password even if it is correct.

3. Basic Checks

If you cannot enter a password or log in to Ubuntu, start with these basic checks. Many issues can be resolved at this stage.

Check Keyboard Status

NumLock and CapsLock

  • NumLock Status
    If your password contains numbers, NumLock must be enabled. Check if the NumLock indicator light is on.
  • Solution: Press the NumLock key once to enable it.
  • CapsLock Status
    Passwords are case-sensitive. If CapsLock is on, letters may be entered in uppercase unexpectedly.
  • Solution: Check and toggle CapsLock if needed.

External Keyboard Issues

  • If using a USB or wireless keyboard, ensure that it is properly connected.
  • Solution: Reconnect the keyboard or try another USB port.

Check Keyboard Layout Settings

Via the GUI (Graphical Interface)

  • The login screen may allow you to select a keyboard layout. Ensure you have selected the correct one (e.g., Japanese (JP)).

Confirm and Change Layout in Terminal

You can also check the current layout using the terminal.

  1. Check current settings
    Enter the following command:
localectl status

Example output:

System Locale: LANG=ja_JP.UTF-8
VC Keymap: jp
X11 Layout: jp

This example shows that the “jp” (Japanese) layout is set correctly.

  1. Change keyboard layout if necessary
sudo dpkg-reconfigure keyboard-configuration

Follow the instructions to choose the proper layout.

Verify Login Screen Operations

  • Use On-Screen Keyboard
    If the physical keyboard may be faulty, use the on-screen keyboard from the accessibility menu to verify input.
  • Confirm login behavior after login
    If password entry works but login still fails, try logging in with a guest account and review system settings.

4. Using Recovery Mode

Recovery mode is a powerful tool for resolving system issues in Ubuntu. This section explains how to use recovery mode to fix password input and login problems.

How to Enter Recovery Mode

Follow these steps to access recovery mode:

  1. Restart the system
  • During startup, press and hold the Shift key (or Esc on some systems). This will open the GRUB boot menu.
  1. Select Recovery Mode
  • In the GRUB menu, choose Advanced options for Ubuntu.
  • From the displayed options, select the entry labeled recovery mode (e.g., Ubuntu, with Linux xxx-recovery mode).
  1. Operate Recovery Mode
  • Once recovery mode starts, a menu appears. Common options include:
    • root (root shell prompt)
    • fsck (file system check)
    • network (enable networking)

Resetting the Password

You can use the passwd command in recovery mode to reset user passwords.

  1. Access the root shell prompt
  • Select root from the recovery menu to open the terminal with root privileges.
  1. Enable write mode
  • By default, the root file system is mounted as read-only. Enable write mode using this command:
    bash mount -o remount,rw /
  1. Verify user accounts
  • To list users on the system, enter:
    bash ls /home
    Identify the account name you need.
  1. Reset the password
  • Reset the password by entering:
    bash passwd username
    Type and confirm a new password.
  1. Reboot the system
  • Restart Ubuntu after resetting the password:
    bash reboot

Fixing User Accounts

If the user account itself is problematic, you can repair it or create a new one in recovery mode.

Create a New Account

  1. Create a new user with this command:
adduser new_username
  1. Grant administrator privileges to the new user:
usermod -aG sudo new_username

Unlock an Existing Account

  • If the account is locked, use the following command:
passwd -u username

Important Notes

  • Be cautious when resetting passwords
    Resetting passwords may affect other authentication processes such as SSH or FTP. Verify system settings after making changes.
  • Consider backing up data
    Before making changes in recovery mode, consider backing up important data in case of unexpected loss.

5. Repairing System Configuration

If login or password issues are caused by system configuration problems, repairing certain components can resolve them. This section explains how to fix common issues such as Wayland compatibility and corrupted xorg.conf settings.

Regenerating xorg.conf

If the xorg.conf display configuration file is corrupted, the login screen may not function correctly. Follow these steps to create a new file.

1. Back up the current configuration file

Backup the potentially corrupted file:

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

2. Create a new xorg.conf file

Generate a new configuration file:

sudo X -configure

The new file will be created as /etc/X11/xorg.conf.new.

3. Apply the configuration file

Move the generated file to the correct location:

sudo mv /etc/X11/xorg.conf.new /etc/X11/xorg.conf

4. Restart the system

Reboot to apply changes:

sudo reboot

Disable Wayland

Wayland is Ubuntu’s default display server, but incompatibility issues may occur depending on hardware or drivers. Disabling Wayland and switching to Xorg may resolve login issues.

1. Edit the configuration file

Use the following command to edit the configuration file:

sudo nano /etc/gdm3/custom.conf

2. Modify the Wayland setting

Locate the following line in the file:

#WaylandEnable=false

Remove the # to enable the setting:

WaylandEnable=false

3. Save and exit

Press Ctrl + O to save and Ctrl + X to exit.

4. Restart GDM

Restart the GNOME Display Manager:

sudo systemctl restart gdm3

5. Reboot the system

Reboot to apply all changes:

sudo reboot

Other Repair Methods

File System Check

If file system corruption is suspected, try the following:

  1. Enter recovery mode and run fsck:
fsck -f /dev/sdX

※ Replace /dev/sdX with the appropriate partition.

  1. Restart the system after repairs are completed.
reboot

Reinstall Graphics Drivers

If the login screen fails due to graphics issues, reinstall the drivers:

sudo apt-get install --reinstall xserver-xorg-video-intel

6. FAQ (Frequently Asked Questions)

Here are common questions users have regarding Ubuntu password and login issues, along with their answers.

Q1: Is it normal that nothing appears when I type my password?

A: Yes, this is normal. For security reasons, Ubuntu does not show characters or dots while typing passwords. Enter your password carefully and press Enter.

Q2: What should I do if I cannot enter recovery mode?

A: Try the following:

  1. Press and hold the Shift or Esc key during boot. Timing is crucial—press after the BIOS screen disappears.
  2. If GRUB does not appear, disable Secure Boot in BIOS.
  3. Check that the correct boot device is selected.

Q3: I reset my password, but still cannot log in. What now?

A: Try these steps:

  1. Check account information in recovery mode:
ls /home
  1. If the account is locked, unlock it:
passwd -u username
  1. Verify the permissions of the home directory:
sudo chmod 700 /home/username

Q4: What should I be aware of when Japanese input is enabled?

A: Japanese input may cause unexpected characters to appear in the password field. Try:

  1. Press Ctrl + Space or Shift + Space to disable Japanese input on the login screen.
  2. Verify that the correct keyboard layout (English US or Japanese JP) is selected.

Q5: Can USB keyboards or external devices cause login issues?

A: Yes. Try the following:

  1. Use another USB port.
  2. Replace batteries for wireless devices.
  3. Test with a different keyboard.

Q6: Should I reset BIOS settings?

A: Resetting BIOS may help if hardware or drivers cause issues. Before making changes, record the current settings. General steps:

  1. Enter BIOS by pressing F2 or Del.
  2. Select Restore Defaults or Load Optimized Defaults.
  3. Save and restart.

7. Summary

Login problems—such as being unable to type a password or access Ubuntu—can be especially frustrating for new users. However, most issues can be solved by following the instructions in this guide. Let’s review the key points.

Basic Troubleshooting Flow

  1. Check keyboard settings
  • Confirm NumLock and CapsLock settings, and ensure the keyboard layout is correct.
  1. Use recovery mode
  • Reset passwords or repair user accounts using passwd and other tools.
  1. Repair system configuration
  • Regenerate xorg.conf and disable Wayland if necessary.
  1. Prevent recurrence
  • Regular backups and periodic keyboard configuration checks help prevent future issues.

Preventing Future Problems

  • Perform regular backups
    Use backup tools such as Timeshift to restore system state when needed.
  • Check keyboard settings regularly
    Review the keyboard configuration to avoid unexpected input issues.
  • Learn basic Linux operations
    Understanding basic Linux commands improves troubleshooting efficiency.

Final Notes

If this guide helped you resolve your login issue, consider sharing it with other Ubuntu users facing similar challenges. For continued learning, refer to Ubuntu’s official documentation or reliable technical blogs.