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.
Since you cannot log in normally, you must access the boot menu to enter recovery mode.
Once the recovery menu loads, you will see a list of repair options.
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.).
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.
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