Courseiva
User and Group ManagementhardMultiple ChoiceObjective-mapped

LFCS chage Practice Question

An administrator wants to enforce that users in the 'contractors' group must change their password every 30 days, with a warning 7 days before expiry. Which command should be used?

⚠ Common exam trap

The trap is that candidates may think `chage` can take a group name, but it requires a username. Also, `passwd` has similar aging options but also requires a username.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

chage -M 30 -W 7 contractors

None of the provided commands can be directly applied to a group. The `chage` command is the appropriate tool for password aging, but it requires a username as an argument. To enforce password aging on all users in the 'contractors' group, an administrator would need to iterate over each user in the group and run `chage -M 30 -W 7 <username>` for each.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • groupmod -p 30 contractors

    Why it's wrong here

    Incorrect. `groupmod -p` is not a valid option; `groupmod` does not handle password aging.

  • passwd -x 30 -w 7 contractors

    Why it's wrong here

    Incorrect. `passwd -x 30 -w 7` can set password aging, but it requires a username, not a group name.

  • usermod -e 30 contractors

    Why it's wrong here

    Incorrect. `usermod -e` sets the account expiry date, not password aging.

  • chage -M 30 -W 7 contractors

    Why this is correct

    Incorrect. `chage -M 30 -W 7` is the right command for password aging, but it requires a username, not a group name.

About these practice questions

This LFCS question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.