A system administrator is hardening a new Linux server and is auditing the default file permissions. They notice that while /etc/passwd is readable by all users, the /etc/shadow file is restricted to root access only. What is the primary purpose of the /etc/shadow file in a modern Linux system?
To define the primary and supplementary group memberships for each user on the system.
To store system-wide environment variables and startup scripts that are executed for all users upon login.
To serve as a template for new user home directories, containing default profile and configuration files.
To store sensitive user information, including hashed passwords and password expiration data, protecting it from non-privileged users.
The correct answer is that the /etc/shadow file stores sensitive user information, including hashed passwords and password expiration data. In early Linux systems, the encrypted password was stored in the world-readable /etc/passwd file, creating a security risk where any user could access the password hashes and attempt to crack them offline. The introduction of /etc/shadow, which is only accessible by the root user, mitigates this risk by separating sensitive authentication data from general user account information.
The /etc/group file is used to define group memberships for users. The /etc/skel directory acts as a template, and its contents are copied to a new user's home directory upon creation. The /etc/profile file contains system-wide environment settings and startup scripts for all users who log in with a shell.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is `/etc/shadow` restricted to root-only access?
Open an interactive chat with Bash
How did earlier Linux systems handle password storage before `/etc/shadow`?
Open an interactive chat with Bash
What information is stored in `/etc/passwd` vs `/etc/shadow`?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .