Which data is stored in the /etc/shadow file on Unix-like systems?

Enhance your cyber defense skills with the Security Blue Team Level 1 Test. Prepare with flashcards, multiple choice questions, and detailed explanations to ace your exam!

Multiple Choice

Which data is stored in the /etc/shadow file on Unix-like systems?

Explanation:
Data stored in /etc/shadow focuses on authenticating a user: the login name is paired with the password information and aging rules for that account. For security, the password hash (the encrypted password) and the password-expiration data are kept separate from other account details, and this file is readable only by root. Each entry includes the account name, the encrypted password hash, and expiration values such as when the password was last changed, the minimum and maximum ages, warning period, inactivity, and any absolute expiration date. This combination—account name, encrypted password, and expiration data—best matches what /etc/shadow holds. The other data shown don’t fit: usernames and home directories are typically stored in /etc/passwd, not in /etc/shadow, and encrypted keys are stored in SSH key locations (like ~/.ssh) rather than in the shadow file.

Data stored in /etc/shadow focuses on authenticating a user: the login name is paired with the password information and aging rules for that account. For security, the password hash (the encrypted password) and the password-expiration data are kept separate from other account details, and this file is readable only by root. Each entry includes the account name, the encrypted password hash, and expiration values such as when the password was last changed, the minimum and maximum ages, warning period, inactivity, and any absolute expiration date. This combination—account name, encrypted password, and expiration data—best matches what /etc/shadow holds.

The other data shown don’t fit: usernames and home directories are typically stored in /etc/passwd, not in /etc/shadow, and encrypted keys are stored in SSH key locations (like ~/.ssh) rather than in the shadow file.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy