Computer guides

manuals and small tutorials

Basic user management on debian

Need sudo / root privilege


Quicklinks Create a user Delete a user Change user password Extra


CREATE A USER To create a new user on debian, use the adduser command.

linuxwebs@desktop:~$ sudo adduser newuser

This will prompt you to set the new user's password. This can be changed later with the passwd utility. Press enter to skip the prompts asking for contact details. No values will be submitted.

linuxwebs@desktop:~$ sudo adduser new_user1 Adding user `new_user1' ... Adding new group `new_user1' (1007) ... Adding new user `new_user1' (1007) with group `new_user1' ... Creating home directory `/home/new_user1' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for new_user1 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 linuxwebs@desktop:~$

Enter "y" to verify the information is correct. The user new_user1 is now created. Login to the new account with su username:

linuxwebs@desktop:~$ su new_user Password: new_user1@desktop:$


DELETE A USER To remove a user from the machine, use the deluser utility.

linuxwebs@desktop:~$ sudo deluser new_user1 [sudo] password for linuxwebs: Removing user `new_user1' ... Warning: group `new_user1' has no more members. Done.

CHANGE USER'S PASSWORD Set a user's password with the passwd utility. Requires root login or sudo.

linuxwebs@desktop:~$ sudo passwd new_user1 Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully

EXTRAS Confusion Beware of confusing adduser with useradd, which "is a low level utility for adding users". Read about the differences with the man command. This will show a utility's manual. Example usage: man adduser

Wordpress starter guide. Create websites or blogs with ease.

Start here