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 serve as a template for new user home directories, containing default profile and configuration files.
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 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...
IT & Cybersecurity Package Join Premium for Full Access