Users and permissions
12 articles, grouped by kind; the order follows the tracks.
Concepts 5
-
File permissions
The Unix permission model — read/write/execute, owner/group/other, special bits.
6 minls -lnamei -lchmod -
Users and groups
Linux accounts and groups; usermod -G without -a replaces all of a user's supplementary groups instead of adding one.
5 minid aliceuseradd -musermod -aG -
umask — the mask for new files and directories
umask is a process mask: which permissions to remove from a new file (from 666) and directory (from 777).
6 minumaskumask -Stouch -
Special permission bits: setuid, setgid, sticky
Special permission bits: setuid and setgid run a program as its owner; setgid and sticky shape shared directories.
7 minls -ldchmodstat -c -
Extended permissions (ACL)
Flexible rights beyond rwx — getfacl/setfacl, per-user and per-group grants.
4 mingetfacl filesetfacl -msetfacl -d
Commands 7
-
namei — permissions at every step of a path
The namei command walks a path part by part and shows the type, mode and owner of each directory down to the file.
5 minnamei -lnamei -mnamei -o -
useradd — create a user
The useradd command creates a user account with a home directory, shell, groups and UID; passwd sets the password.
6 minuseradd -mpasswd aliceuseradd -r -
passwd — change or lock a password
The passwd command changes your own password; as root it sets, locks and shows the passwords of other users.
6 minpasswdpasswd alicepasswd -S -
usermod — change an account and its groups
The usermod command changes an existing account — groups, login shell, home directory, name and locking.
6 minusermod -aGusermod -rGusermod -G -
chmod / chown — permissions and ownership
Changing permissions (chmod) and owner/group (chown) — numeric and symbolic syntax, umask, chgrp.
6 minchmodchownchown -R -
chage — password and account expiry
Reads and changes local password aging settings and an account expiration date.
4 minchage -lgetent passwdpasswd -S -
nologin — a shell that refuses login
A login-shell replacement that reports refusal and exits instead of opening an interactive shell.
4 mingetent passwdid labsvctype -a
Nothing found. Try a shorter query.