04 Manage Local Users and Groups
04 Manage Local Users and Groups
04 Manage Local Users and Groups
○ Managing passwords
○ Group memberships
○ User Login
List all Users
lists all known users on the system with detailed information
● Command: lslogins
Machine
Add a new User (or Regular UserName (Hostname)
account)
● Command: useradd -c ‘<user_info’ <user_name> OR
adduser <user_name> [works in Debian based dist.]
Checking Current Users
● Command: cat /etc/passwd
/etc/passwd : User account info file
Note : "x" placeholder denotes that the encrypted password is stored in the
/etc/shadow file for security.
Display user and their group information
● Command: id <user_name>
Modify user account properties (-s is to change the user's login shell)
● Command: usermod -s <new_shell> <user_name>
OR
● Command : echo ‘<user_name>:<password>’ | chpasswd
● Checking Users password
○ Command: cat /etc/shadow