How to manage users in Ubuntu

How to manage users in Ubuntu

In this step by step tutorial you will learn how create, delete and manage users in Ubuntu.. This study guide is helpful for managing users in Ubuntu.


To create a user in Ubuntu Command line we use the command adduser
Syntax: adduser (username here)

1

We will then be

2

be prompted for a password for this new user and to confirm it,

Ubuntu will then ask for optional details like full name, room number, Work and Home phone number – you can just skip this by pressing enter for each field

3

You will then need to confirm the details by typing Y for yes or N for No

You can remove users by the command userdel
Syntax: userdel (username here)

4

You can add a user to the Sudoers group by editing the sudoers file and adding their name to the list like so. You need to add the following line that is circled below (swap Jamie for your user) Once added you can press Ctrl+X and save to exit

/usr/sbin/visudo

5

To create a new group in Ubuntu we use the command groupadd
Syntax: groupadd (group name here)

6

To remove a group in Ubuntu we use the command groupdel
Syntax: groupdel (group name here)

7

To add a user to a group in Ubuntu we use the command usermod
Syntax: usermod –a –G (group name)(username)

8

To remove a user from a group in Ubuntu we use the command deluser

9

Syntax: deluser (username) (group name)