Courseiva

LFCS User and Group Management Practice Question

An administrator wants to force a user to change their password at next login. Which command should be used?

⚠ Common exam trap

Candidates often confuse account locking (`passwd -l` or `usermod -p '!'`) with password expiration, as both prevent normal login but only expiration forces a password change at next login.

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

✓

passwd -e user

The `passwd -e user` command immediately expires the user's password, forcing them to change it at the next login. This is the standard method to achieve this requirement on Linux systems.

Answer analysis

Option-by-option breakdown

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

  • ✗

    passwd -l user

    Why it's wrong here

    passwd -l prefixes the stored hash with a lock marker, disabling password authentication entirely rather than expiring the credential. Locking is correct for suspending an account; forcing a change at next login requires expiring the password field instead.

  • ✓

    passwd -e user

    Why this is correct

    passwd -e user expires the account's password immediately, setting the shadow field so the next login forces a change. This directly satisfies the requirement to force a password change at next login, unlike -l or -d which lock or clear it.

  • ✗

    chage -m 0 user

    Why it's wrong here

    chage -m 0 sets the minimum days between password changes to zero, which only permits immediate changes; it does not expire the current password. It is used to relax change-frequency limits, whereas forcing a change at next login requires expiring the password.

  • ✗

    usermod -p '!' user

    Why it's wrong here

    usermod -p '!' writes a literal locked hash into the password field, disabling login rather than expiring the password. This is used to lock an account; forcing a change at next login requires marking the password as expired so the user must set a new one.

About these practice questions

One of 406 original LFCS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.