Adding Users with adduser

If you want to use adduser instead of useradd, because it walks you through a complete new user setup—password, GECOS fields, and all, simply run adduser newusername and follow the prompts:

# adduser anitab
Adding user anitab…
Adding new group anitab (1008).
Adding new user anitab (1008) with group anitab.
Creating home directory /home/anitab.
Copying files from /etc/skel
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for anitab
Enter the new value, or press ENTER for the default
Full Name [ ]:
Room Number [ ]:
Work Phone [ ]:
Home Phone [ ]:
Other [ ]:
Is the information correct? [y/n] y

You can assign a UID, overriding the default:

# adduser —uid 1500 anitab

adduser’s defaults are configured in /etc/adduser.conf