Here is the very useful list of commands used to manage users.

  1. su (1) – run a shell with substitute user and group IDs
  2. useradd (8) – Create a new user or update default new user information
  3. userdel (8) – Delete a user account and their files from the system. The command “userdel -r newuser” will remove the user and deletes their home directory.
  4. usermod (8) – Modify a user account.
  5. adduser(8) – Command used to add user accounts.
  6. chage (1) – Used to change the time the user’s password will expire.
  7. chfn(1) – Change a user’s finger information
  8. chsh(1) – Change a user’s shell.
  9. chgrp (1) – Changes the group ownership of files.
  10. chown (1) – Change the owner of file(s ) to another user.
  11. gpasswd (1) – Used to administer the /etc/group file.
  12. groupadd (8) – Create a new group.
  13. grpconv (8) – Creates /etc/gshadow from the file /etc/group which converts to shadow passwords.
  14. grpunconv (8)- Uses the files /etc/passwd and /etc/shadow to create /etc/passwd, then deletes /etc/shadow which converts from shadow passwords.
  15. groupdel (8) – Delete a group
  16. groupmod (8) – Modify a group
  17. groups (1) – print the groups a user is in
  18. grpck (8) – Verify the integrity of group files.
  19. id(1) – Print group or user ID numbers for the specified user.
  20. newgrp(1) – Allows a user to log in to a new group.
  21. newusers (8) – Update and create new users in batch form.
  22. nologin (5) – Prevent non-root users from logging onto the system.
  23. passwd (1) – Used to update a user’s password. The command “passwd username” will set the password for the given user.
  24. pwconv (8) – Used to create the file /etc/shadow from the file /etc/passwd to convert to shadow passwords.
  25. pwunconv (8) – Uses the files /etc/passwd and /etc/shadow to create /etc/passwd, then deletes /etc/shadow to convert from shadow passwords.

Written by Bala Krishna

Bala Krishna is web developer and occasional blogger from Bhopal, MP, India. He like to share idea, issue he face while working with the code.