You are on page 1of 1

Linux User and Groups Commands

--------------------------------------------------------------------------------
Useful commands for working with Users and Groups
User Commands:
useradd creates a new user
passwd sets a password for a user account
usermod modifies parts of a user account
chage changes password expiration values
userdel removes a user account
Group Commands:
groupadd creates a new group
gpasswd sets group passwords
groupmod modifies group information
groupdel removes a group
newgrp temporarily changes Primary Group
groups lists groups you belong to
id lists Group IDs for each group
File Commands:
pwconv specifies the use of /etc/passwd and /etc/shadow
pwunconv specifies to only use /etc/passwd
File Locations:
/etc/passwd user information database
/etc/shadow user password database
/etc/group group information database
/etc/login.defs default user values
/etc/default/useradd default user values
/etc/skel contains files to copy to a new user's home directory

You might also like