On a host where /etc/passwd password fields contain x, locate the file holding password hashes.
Which file is appropriate?
With shadow passwords, /etc/passwd contains a marker such as x and hashes plus aging data are stored in /etc/shadow.
Detailed explanation
/etc/shadowCorrect. /etc/shadow stores the password hashes and aging fields.
/etc/groupIncorrect. /etc/group stores group membership data.
/etc/nologinIncorrect. /etc/nologin temporarily blocks non-root logins.
/etc/hostsIncorrect. /etc/hosts maps names to addresses.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'trainee:x:1000:1000::/home/trainee:/bin/bash' | cut -d: -f1,2Expected result
trainee:xKey points
- x in /etc/passwd
- Hashes in /etc/shadow
- Separate authentication data
Notes
- Environment: GNU cut / 一時入力のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Protected account data
Sensitive authentication data stored separately from ordinary account records.
Service availability
Whether a service can start automatically or be activated on demand.
Packet filter
A host firewall rule set that permits or rejects network packets.