nerdexam
LPI

102-500 · Question #139

Of the ways listed, which is the best way to temporarily suspend a single user's ability to interactively login?

The correct answer is D. Use change to expire the user account. Using chage (change age) to expire the account is the correct administrative approach because it directly and reversibly disables a single account without altering credentials or system-wide settings - simply run chage -E 0 username to expire it immediately, and reset the…

Administrative Tasks

Question

Of the ways listed, which is the best way to temporarily suspend a single user's ability to interactively login?

Options

  • AAdd the user name to /etc/nologin.
  • BChange the user's password.
  • CChange the user name in /etc/passwd.
  • DUse change to expire the user account.
  • EPlace the command logout in the user's profile.

How the community answered

(47 responses)
  • A
    9% (4)
  • B
    2% (1)
  • C
    4% (2)
  • D
    70% (33)
  • E
    15% (7)

Explanation

Using chage (change age) to expire the account is the correct administrative approach because it directly and reversibly disables a single account without altering credentials or system-wide settings - simply run chage -E 0 username to expire it immediately, and reset the expiration date to re-enable it later.

Why the distractors fail:

  • A - /etc/nologin blocks all non-root users when the file exists; it's not a per-user control and doesn't accept usernames as content.
  • B - Changing the password is irreversible without knowing the original, creates a support burden, and doesn't cleanly signal "account suspended" to the system.
  • C - Editing the username in /etc/passwd breaks file ownership, running processes, and cron jobs - it's destructive, not temporary.
  • E - Placing logout in a profile script doesn't prevent login; it just terminates the session immediately after it starts, which is unreliable and easily bypassed.

Memory tip: Think of chage as "change age" - it controls the lifetime of an account. When you need to temporarily kill a single account, you're managing its age/expiration, so reach for chage.

Topics

#user account expiration#chage command#login restrictions#account suspension

Community Discussion

No community discussion yet for this question.

Full 102-500 Practice