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)
We will then be
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
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)
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
To create a new group in Ubuntu we use the command groupadd
Syntax: groupadd (group name here)
To remove a group in Ubuntu we use the command groupdel
Syntax: groupdel (group name here)
To add a user to a group in Ubuntu we use the command usermod
Syntax: usermod –a –G (group name)(username)
To remove a user from a group in Ubuntu we use the command deluser
Syntax: deluser (username) (group name)