Document where user identity data and password-aging data are stored in a shadow-password system.
Which mapping is correct?
/etc/passwd stores basic attributes such as UID and login shell; /etc/shadow stores password hashes and aging fields.
Detailed explanation
/etc/passwdにhash、/etc/shadowにUIDを保存するIncorrect. It reverses hash and UID storage.
Incorrect. It reverses hash and UID storage.
/etc/groupにhash、/etc/passwdにagingを保存するIncorrect. It confuses group data with password data.
Incorrect. It confuses group data with password data.
/etc/nologinにhash、/etc/shadowにshellを保存するIncorrect. /etc/nologin blocks logins and the shell is in passwd.
Incorrect. /etc/nologin blocks logins and the shell is in passwd.
/etc/passwdに基本属性、/etc/shadowにhashとaging情報を保存するCorrect. The mapping separates public account attributes from authentication secrets.
Correct. The mapping separates public account attributes from authentication secrets.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'passwd: name:x:UID:GID:comment:home:shell' 'shadow: name:hash:last:min:max:warn:inactive:expire'Expected result
passwdは基本属性、shadowはhashとagingKey points
- passwd has basic attributes
- shadow has hashes
- Aging fields are separate
Notes
- Environment: printf / フィールド対応の確認のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.