User and Group Management Flashcards
6 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 6 User and Group Management flashcards as text
A system administrator needs to add an existing user, 'testuser', to an existing supplementary group called 'developers'. Which of the following commands will achieve this without removing the user from their current supplementary groups?
Answer: usermod -aG developers testuser
The `usermod -aG` command is used to modify a user's group membership. The `-a` (append) flag is crucial as it adds the user to the specified group(s) without removing them from their existing supplementary groups. The `-G` flag specifies the supplementary group(s).
Which file should be modified to set the default password aging policies, such as `PASS_MAX_DAYS`, for all newly created users on a Linux system?
Answer: /etc/login.defs
The `/etc/login.defs` file contains system-wide configuration for user and group management tools. It is the correct place to define default password aging policies like `PASS_MAX_DAYS`, `PASS_MIN_DAYS`, and `PASS_WARN_AGE` that will be applied to all new user accounts created with `useradd`.
A temporary user account named 'contractor' needs to be created, and it must automatically be disabled on a specific date. Which command correctly creates the user with an expiration date of December 31, 2026?
Answer: useradd -e 2026-12-31 contractor
The `useradd` command is used to create new users. The `-e` or `--expiredate` option allows you to specify a date on which the user account will be disabled. The date format is YYYY-MM-DD.
A user, 'jdoe', reports that they cannot access files owned by the 'editors' group. You need to change 'jdoe's' primary group to 'editors'. Which command accomplishes this?
Answer: usermod -g editors jdoe
The `usermod` command is used to modify user account details. The `-g` (lowercase) option specifically changes the user's primary group ID (GID). The group 'editors' must already exist.
As a system administrator, you need to create a new group named 'auditors' with a specific Group ID (GID) of 2005. Which of the following commands is the correct way to do this?
Answer: groupadd -g 2005 auditors
The `groupadd` command is the standard utility for creating new groups. The `-g` or `--gid` option is used to specify the numerical Group ID (GID) for the new group.
After creating a new user, you are tasked with setting their password to expire in 90 days, warning them 14 days before it expires, and locking the account 7 days after it expires. Which command is best suited for modifying all these password aging attributes for an existing user?
Answer: chage
The `chage` (change age) command is specifically designed to modify user password expiry information. It can be used to set the maximum number of days between password changes (`-M`), the warning period (`-W`), and the inactive period (`-I`) after expiration before the account is locked.
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