Skip to content

How to manage users and groups in Linux

Linux

FAQ · Linux · Help & Support

07. Sep 2023 1 min

Managing users and groups is an essential part of Linux system administration.

1. Connect to the server via SSH.
2. Create a new user with adduser [username].
3. You can add a user to additional groups with usermod -aG [groupname] [username].
4. Use deluser [username] to delete a user.
5. List all users on the system with getent passwd.
6. Create a new group with addgroup [groupname] and add users to the group with adduser [username] [groupname].
7. List all groups on the system with getent group.
8. Change a user's password with passwd [username].
9. Use the command id [username] to see a user's ID and group memberships.
10. The file /etc/passwd contains information about users, and the file /etc/group contains information about groups.

Still have questions?

Our support team is happy to help - via ticket, email, or phone.