linux users, groups

utilities/commands:

$useradd
$userdel
$usermod

more user-friendly – adduser, deluser

——————————————–
list of usernames of users currently logged in
$users

show who is logged on, with info
$who

show who and what they are doing
$w

your user id, the user currently logged in, in this session
$whoami

list of all users in the system
– is in the file /etc/passwd
to list just the user names use
$awk -F: '{print $1}' /etc/passwd

——————————————–
print user identity and ids of all groups the user belongs to
$id

prints the groups a user is a member of
$groups

——————————————–

password management
$passwd
super user can use the same command to set passwords and other options for other users
especially useful with the -e option that sets the password to expire immediately, forcing the user to change password the next time they login
$passwd -e

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s