Reading:
man 5 passwd man 5 shadow man 5 group man 5 gshadow
# useradd [-D] [lots of options]
# useradd
-D
# userdel [-r] username
# userdel
-r
# usermod [lots of options]
# usermod
/etc/passwd
/etc/group
# adduser
# newusers
> chfn [username]
> chfn
> chsh [username]
> chsh
> passwd [-l|-u] [username]
> passwd
-l
-u
# chpasswd
# chage [-l] user
# chage
# groupadd group # groupmod group # groupdel group # gpasswd group
# groupadd
# groupmod
# groupdel
# gpasswd
user*
/etc/default/useradd
/etc/skel/
/etc/passwd (man 5 passwd)
chfn
chsh
/etc/shadow (man 5 shadow)
/etc/shadow
/etc/group (man 5 group)
/etc/gshadow (man 5 gshadow)
/etc/gshadow
/etc/passwd- /etc/shadow- /etc/group- /etc/gshadow-
/etc/passwd-
/etc/shadow-
/etc/group-
/etc/gshadow-
> diff /etc/passwd /etc/passwd-
These programs lock the file being edited such that it cannot be modified by programs such as passwd, chsh, etc while you're editing it. Should only be used when making complicated or large edits. The editor invoked is defined by the EDITOR environment variable or vi by default.
EDITOR
vi
# vipw [-s]
# vipw
-s
# vigr [-s]
# vigr
> sudo [-i | -s ] [ command ]
> sudo
-i
# su [-] [username] [-c command] [-p]
# su
-
-c
-p
# newgroup [-] [group]
# newgroup
# sg [-] [group [-c ] command]
# sg
> id
> groups
> login
/etc/sudoers
sudo
/etc/sudoers.d/
/etc/login.defs (man 5 login.defs)
/etc/login.defs
/etc/profile /etc/csh.login /etc/profile.d/*
/etc/profile
/etc/csh.login
/etc/profile.d/
> last
> sac / ac
> dump-utmp / rawtmp
> finger > w > who > users
> finger
> w
> who
> users
/var/run/utmp
w
who
users
finger
/var/log/wtmp
ac
sac
last
Log files in /var/log/*
/var/log/*
/usr/sbin/klogd
# dmesg
/usr/sbin/syslogd
/etc/syslog.conf
> logger [options] [message]
> logger
# logrotate
/etc/logrotate.conf
File-system quotas are a limit to the number of blocks of data that any specific user (or group) are allowed to use. The limit could be in blocks or number of inodes. There are two types of limits, a hard limit and a soft limit. No space can be used in excess of a hard limit (if present) no matter what, however space can be used in excess of a soft limit for a period of 7 days (the grace period) after which the limit becomes a hard-limit. An account or group can have either a hard or soft limit, both or neither.
In order for quotas to be enabled on a file-system the kernel needs to support quotas on that file-system and quotas need to be enabled by selecting the quota, usrquota or grpquota mount options for the file-systems you want to enable quotas on. Once a file-system has been mounted with quota support, quotas are only enabled once quotaon has been run for that file-system. Quotas can be disabled by running quotaoff for that file-system.
quotaon
quotaoff
If quotas become out of sync or quotas are being enabled for a file-system for the first time, quotacheck should be run on the file-system to accumulate usage information for each user using the file-system and update/create the aquota.user file that will be found at each file-systems mount-point (the root of that file-system.)
quotacheck
# quotacheck [-v] [-a] [filesystem]
# quotacheck
-v
-a
aquota.user
# quotaon [-a] [fs]
# quotaon
# quotaoff [-a] [fs]
# quotaoff
> quota [-u|-g] [user | group]
> quota
-g
# edquota [-pprotouser] [-u | -g] [ username | groupname ]
# edquota
# setquota [options]
# setquota
> warnquota
> repquota > quotastats
> repquota
> quotastats