Recall & Review
beginner
What is the purpose of the
/etc/passwd file in Linux?The
/etc/passwd file stores basic information about user accounts, such as username, user ID, group ID, home directory, and default shell. It is readable by all users.Click to reveal answer
beginner
Why is the
/etc/shadow file separated from /etc/passwd?The
/etc/shadow file stores encrypted user passwords and related security information. It is kept separate and readable only by the root user to protect password security.Click to reveal answer
intermediate
What kind of information does each line in
/etc/passwd contain?Each line has 7 fields separated by colons: username, password placeholder (usually 'x'), user ID (UID), group ID (GID), user info (comment), home directory, and default shell.
Click to reveal answer
intermediate
Who can read the
/etc/shadow file and why?Only the root user or processes with root privileges can read
/etc/shadow because it contains sensitive encrypted password data that must be protected from unauthorized access.Click to reveal answer
intermediate
How does Linux use
/etc/passwd and /etc/shadow together during login?Linux uses
/etc/passwd to find user details and /etc/shadow to verify the encrypted password during login. This separation improves security by limiting password exposure.Click to reveal answer
Which file contains the encrypted passwords in a Linux system?
✗ Incorrect
Encrypted passwords are stored in /etc/shadow to keep them secure and restrict access.
What does the 'x' in the password field of /etc/passwd indicate?
✗ Incorrect
The 'x' means the actual password is stored securely in /etc/shadow.
Who can read the /etc/passwd file by default?
✗ Incorrect
/etc/passwd is world-readable because it contains non-sensitive user info.
What is the main reason for separating password data into /etc/shadow?
✗ Incorrect
Separating passwords into /etc/shadow restricts access to sensitive data.
Which field in /etc/passwd specifies the user's default shell?
✗ Incorrect
The seventh field in /etc/passwd is the user's default shell.
Explain the roles of /etc/passwd and /etc/shadow files in Linux user management.
Think about what info is public and what needs protection.
You got /4 concepts.
Describe the typical fields found in a line of /etc/passwd and their meanings.
There are seven fields separated by colons.
You got /7 concepts.