8. Users and groups

  • UID

  • GID

  • GECOS

8.1. Paths

  • /etc/passwd

  • /etc/shadow

  • /etc/group

  • /etc/skel

8.2. useradd vs. adduser

8.3. Commands

Table 8.1. User, Password and Groups

Command

Type

Description

addgroup

add a user or group to the system

adduser

add a user or group to the system

chgpasswd

update group passwords in batch mode

chpasswd

update passwords in batch mode

delgroup

remove a user or group from the system

deluser

remove a user or group from the system

groupadd

create a new group

groupdel

delete a group

groupmod

modify a group definition on the system

groups

print the groups a user is in

id

print real and effective user and group IDs

last

show a listing of last logged in users

login

begin session on the system

login

write utmp and wtmp entries

logname

print user's login name

logout

write utmp and wtmp entries

nologin

prevent unprivileged users from logging into the system

nologin

politely refuse a login

passwd

change user password

passwd

the password file

su

run a command with substitute user and group ID

sudo

execute a command as another user

useradd

create a new user or update default new user information

userdel

delete a user account and related files

usermod

modify a user account

users

print the user names of users currently logged in to the current host

visudo

edit the sudoers file

w

Show who is logged on and what they are doing.

who

show who is logged on

whoami

print effective userid

ulimit

get and set user limits

mesg

display (or do not display) messages from other users

wall

write a message to all users

write

send a message to another user