Add a User | Change Password in Ubuntu


Get a Linode SliceI can highly recommend Linode installations. Easy, fully functional, optimized, ready to go, LAMP stack.


Ubuntu Users and Groups

Users are located in /etc/passwd
Groups are located in /etc/group

The administrative ROOT account is disabled by default in all Ubuntu installations.

If you wish to enable the root account

simply give it a password by typing

sudo passwd

To disable the root account

sudo passwd -l root

The initial user created by the Ubuntu installer is a member of the group admin which is added to the file /etc/sudoers as an authorized sudo user. If you wish to give any other account full root access through sudo, simply add them to the admin group.

Add the User to the Admin Group

sudo adduser username admin
sudo adduser username groupname

Create a User

sudo useradd -d /home/username -m username

Set the User’s Password

sudo passwd username

To temporarily lock or unlock a user account

sudo passwd -l username
sudo passwd -u username

To add or delete a personalized group

sudo addgroup groupname
sudo delgroup groupname