/etc/shadow
The root-only file that stores each local account's password hash and password aging rules, kept apart from the world-readable /etc/passwd.
Anyone who reads it can try to crack every local password offline.
In more detail
Separating the hashes means ordinary users can look up account names without seeing anything an attacker could crack. Each line holds the login name, the password hash and aging fields such as when the password must change. A leaked copy lets an attacker guess passwords offline at leisure, so it must stay readable only by root.
Example
Unexpected writes to /etc/shadow mean passwords were changed or accounts added.Related terms
- /etc/passwd — The world-readable file that lists local accounts, one per line: name, UID, GID, description, home directory and login shell, separated by colons.
- password hash — A one-way scrambled form of a password that lets a system check a login without storing the password itself.
- authentication — Establishing who a request represents, for example by checking a password, a session cookie or a signed token.
- audit rule — A line that tells the Linux audit system what to record, such as every execve call by a logged-in user or every write to /etc/shadow.
Taught in
- Users, UIDs And The Password File — Linux Fundamentals & Systems Administration
- SIEM Architecture: Ingestion Pipelines & Indexing — Security Operations & Threat Hunting (SOC)
- Users And Groups From A List, With Passwords That Settle — RHCE in Ansible (EX294): Automate Red Hat Systems