User and Group Management Flashcards
7 cards from real LFCS Certification practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 User and Group Management flashcards as text
Which file stores hashed passwords and password aging information for local user accounts on Linux?
Answer: /etc/shadow
/etc/shadow stores hashed passwords along with password aging fields such as last change date, min/max age, and expiry.
A user needs to be added to the 'docker' group without logging out. Which command applies the new group membership to the current shell session?
Answer: newgrp docker
newgrp docker starts a new shell with the specified group as the primary group, applying membership immediately without a full re-login.
What is the effect of setting a user's shell to /sbin/nologin in /etc/passwd?
Answer: The user cannot log in interactively
Setting the shell to /sbin/nologin prevents interactive login while still allowing the account to be used for services.
Which command displays the numeric UID and GID, and all supplementary groups, for the currently logged-in user?
Answer: id
The id command prints the real UID, primary GID, and all supplementary group IDs and names for the current user.
An administrator wants to force a user to change their password on next login. Which command accomplishes this?
Answer: chage -d 0 username
chage -d 0 sets the last password change date to the epoch, which forces the system to require a password change at next login.
Which field in /etc/passwd defines the user's home directory?
Answer: Field 6
The sixth colon-delimited field (index 5, counting from 0) in /etc/passwd specifies the user's home directory path.
What does the -r flag do when passed to the useradd command?
Answer: Creates a system account with a UID below the normal range
useradd -r creates a system account, typically with a UID below 1000, no home directory by default, and no password aging.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- docs.linuxfoundation.org — Renewal, score release, exam format, passing score · verified Oct 2026
- training.linuxfoundation.org — Test delivery, eligibility, fees, registration deadline, time limit, score validity · verified Oct 2026