By default, the useradd
utility on most Linux systems does not assign a password for the created user. Without a password on the user, the user will be unable to login / have access to most of the functionality of the desktop.
To set a password for the user, you use the following command:
passwd <username>
Make sure to replace <username>
with your actual username (without the angle brackets). After running this, you'll be prompted to enter a new password for the user. After setting a password for the user, you should be able to login as normal.
On the other hand, Ubuntu (like all Debian-based distros) comes with the adduser
utility which is a user-friendly frontend to useradd
. Simply running the following command is all you need:
adduser
You will be shown a series of prompts, which allow you to specify the settings for the new user (username, full name, etc.), and is preferred over useradd
in modern Ubuntu versions, and unlike useradd
, you don't have to manually set a password after; part of the setup will prompt you to set the password.