← Back to Guides Homepage

Fix "Login Incorrect" Error on Ubuntu Server 24.04

A common issue with fresh installations of Ubuntu Server 24.04 (especially on VirtualBox or VMware) is receiving a "Login Incorrect" prompt despite entering the correct username and password. This guide walks you through bypassing this error by creating a new, functional user via the GRUB recovery mode.

Step 1: Access GRUB Recovery Mode

Since you cannot log in normally, you must access the boot menu to enter recovery mode.

  1. Restart the guest machine or server.
  2. Immediately hold down the Shift key during the boot process to interrupt the startup and display the GRUB menu.
  3. Use the arrow keys to select Advanced options for Ubuntu.
  4. Select the entry ending in (recovery mode).

Step 2: Drop to Root Shell

Once the recovery menu loads, you will see a list of repair options.

Step 3: Create a New User

The original user account created during installation is likely bugged. We will create a fresh user to bypass this.

Run the following command to create a new user (in this example, we use test123):

adduser test123

You will be prompted to set a password. Enter a simple password (e.g., test123) and confirm it. You can press Enter to skip the additional user information fields (Full Name, Room Number, etc.).

Step 4: Grant Admin Privileges

To ensure this new user can perform administrative tasks, add them to the sudo group.

adduser test123 sudo

This command grants the new user sudo access.

Step 5: Reboot and Test

Now that the user is created, restart the system to exit recovery mode and boot normally.

reboot now

At the login prompt, enter your new credentials:

You should now be successfully logged in. You can verify your sudo privileges by running an administrative command, such as installing a package:

sudo apt install cmatrix

← Back to Guides Homepage