The Account Files
Where Accounts Live
| File | Holds | Notable |
|---|---|---|
/etc/passwd | User accounts | World-readable, no passwords |
/etc/shadow | Password hashes + ageing | Root-only |
/etc/group | Group definitions | Group membership |
/etc/gshadow | Group passwords/admins | Root-only |
A /etc/passwd line has 7 colon-separated fields:
alice:x:1001:1001:Alice Smith:/home/alice:/bin/bash
| | | | | | └ login shell
| | | | | └ home directory
| | | | └ GECOS (comment)
| | | └ primary GID
| | └ UID
| └ password placeholder (x = see /etc/shadow)
└ username
Exam tip: UID 0 = root. System accounts are typically UID < 1000; regular users start at 1000 (Debian/RHEL) - set in /etc/login.defs.