Linux CLI - Users and GroupsYou want to create a script that lists all users with locked passwords. Which file and field should you check?ACheck /etc/passwd, seventh field for '/bin/false'BCheck /etc/passwd, second field for 'x' characterCCheck /etc/group, third field for '!' characterDCheck /etc/shadow, second field for '!' or '*' prefixCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand password locking in /etc/shadowLocked passwords are indicated by '!' or '*' at the start of the encrypted password field (second field) in /etc/shadow.Step 2: Identify correct file and field/etc/passwd second field is a placeholder, /etc/group does not store passwords, and shell field in /etc/passwd is unrelated to password locking.Final Answer:Check /etc/shadow, second field for '!' or '*' prefix -> Option DQuick Check:Locked password indicator = /etc/shadow second field [OK]Quick Trick: Locked passwords start with ! or * in /etc/shadow second field [OK]Common Mistakes:Checking /etc/passwd second field for lockLooking in /etc/group for password infoConfusing shell field with password status
Master "Users and Groups" in Linux CLI9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Linux CLI Quizzes File Permissions and Ownership - chown (change ownership) - Quiz 4medium File and Directory Operations - rm (remove files) - Quiz 15hard File and Directory Operations - touch (create empty files) - Quiz 7medium File and Directory Operations - Why file management is daily work - Quiz 9hard Linux Basics and Terminal - Shell concept (Bash, Zsh) - Quiz 4medium Navigating the File System - pwd (print working directory) - Quiz 6medium Navigating the File System - Tab completion - Quiz 6medium Viewing and Editing Files - head and tail - Quiz 8hard Viewing and Editing Files - head and tail - Quiz 1easy Viewing and Editing Files - tail -f for live log monitoring - Quiz 7medium