Bird
0
0

Which of the following lines correctly shows the format of a typical /etc/shadow entry?

easy📝 Syntax Q12 of 15
Linux CLI - Users and Groups
Which of the following lines correctly shows the format of a typical /etc/shadow entry?
Ausername:x:1000:1000:User Name:/home/user:/bin/bash
Busername:$6$randomsalt$encryptedpassword:18000:0:99999:7:::
Cusername:password:1000:1000:User Name:/home/user:/bin/bash
Dusername:encryptedpassword:1000:1000:User Name:/home/user:/bin/bash
Step-by-Step Solution
Solution:
  1. Step 1: Identify /etc/shadow format

    The /etc/shadow file stores encrypted passwords and related info. The password field looks like $6$randomsalt$encryptedpassword for SHA-512 encryption.
  2. Step 2: Compare options

    The line username:$6$randomsalt$encryptedpassword:18000:0:99999:7::: matches the shadow file format with encrypted password (indicated by $6$) and password aging fields separated by colons. The other options resemble /etc/passwd format or have incorrect password fields.
  3. Final Answer:

    username:$6$randomsalt$encryptedpassword:18000:0:99999:7::: -> Option B
  4. Quick Check:

    /etc/shadow entries have encrypted passwords with $ signs [OK]
Quick Trick: Look for $ signs and many colon-separated fields in shadow entries [OK]
Common Mistakes:
  • Confusing /etc/passwd format with /etc/shadow
  • Expecting plain text passwords in /etc/shadow
  • Missing fields after encrypted password

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes