After setting a temporary password for alice by hand, you want the system to force her to choose her own at her next login, without locking or expiring the account. Which command does that, and what does it write into /etc/shadow?

LPIC-1 Exam 102-500, objective 110. Security hard

Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.

Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.

How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.

The options

Correct chage -d 0 alice

Correct. -d sets the date of the last password change, field 3 of /etc/shadow, counted in days since 1 January 1970. The value 0 is treated specially: the password is considered to need changing, so login succeeds but immediately demands a new password.

Not correct chage -E 0 alice

Wrong. -E writes field 8, the account expiry date. Day 0 is 1 January 1970, which is long past, so the account is disabled and alice cannot log in at all.

Not correct chage -W 0 alice

Wrong. -W writes field 6, the number of warning days before password expiry. Setting it to zero only removes the advance warning; nothing about the current password changes.

Not correct chage -I 0 alice

Wrong. -I writes field 7, the inactivity period after password expiry. A value of zero means the account is disabled as soon as the password expires, which is a harsher rule, not a forced change.

Why

Field 3 of /etc/shadow is the day number on which the password was last changed, so a large value means recent. Zero is reserved to mean the password is stale and must be replaced at the next login, which is why chage -d 0 is the standard way to hand over a temporary password. Compare it with field 8, the account expiry date, where zero means a date in 1970 and therefore a dead account.

Where this comes from

Cited
manual page shadow(5)

Practise this

Reading one question is not practice. The trainer will draw a short set from objective 110 and space the ones you get wrong.

Practise LPIC-1 Exam 102-500

More questions on this objective

All questions on Security

Practise LPIC-1 Exam 102-500