nerdexam
LPI

102-350 · Question #128

Which commands will set a regular users password so it forces them to change it every 60 days? (Choose Two)

The correct answer is A. passwd -x 60 user B. chage -M 60 user. See the full explanation below for the reasoning.

Question

Which commands will set a regular users password so it forces them to change it every 60 days? (Choose Two)

Options

  • Apasswd -x 60 user
  • Bchage -M 60 user
  • Cpasswd +x 60 user
  • Dusermod -f 60 user

How the community answered

(45 responses)
  • A
    78% (35)
  • C
    16% (7)
  • D
    7% (3)

Community Discussion

6
Marit C.Marit C.Apr 3, 2026

A and B are correct. Both passwd -x 60 user and chage -M 60 user write the same field in /etc/shadow, the maximum password age, to 60 days. The passwd -x flag and chage -M flag are just two interfaces to the same underlying data, so either tool gets you there. Option C is a fabrication, there is no +x flag for passwd, and D trips people up because usermod -f sets the inactive period, which is the grace window after expiry before the account locks, not the maximum age at all. Know the shadow file fields cold and these questions become trivial.

25
Grace U.Grace U.Apr 23, 2026

Both tools that can touch password aging policy are worth knowing cold for this exam, and if you can picture what the -f flag actually controls in usermod versus what -M controls in chage, two of those options will drop out pretty quickly. When you look at the flags that survived your reasoning, what does the -x in passwd correspond to in the chage world, and does that connection help you feel more settled about why those two go together?

1
Marit C.Marit C.Apr 25, 2026

The -x in passwd maps to -M in chage, both setting the maximum number of days before a password must be changed, so once you have that pair locked in the rest of the aging flags tend to fall into place by contrast.

0
Carlos M.Carlos M.Mar 22, 2026

A and B are correct. passwd -x 60 user sets the maximum password age to 60 days using the -x flag, and chage -M 60 user does the exact same thing through the chage utility, just a different path to the same result. D is the trap here because usermod -f sets the inactive period, which is the grace window after expiration before the account gets locked, not the max age itself, so people who half-remember the flags will grab it. C is just made up, there is no +x flag for passwd.

0
Grace U.Grace U.Mar 23, 2026

Carlos has it exactly right, and the inactive-period trap on D is the one that gets people on timed exams because -f sounds close enough to "force expiry" that it feels plausible under pressure.

0
Ingrid P.Ingrid P.Apr 12, 2026

I had D on my shortlist because usermod shows up so often in user-management questions that my brain autocompletes it, but the -f flag sets the inactivity period after expiry, not the max password age, so once I ran that distinction through my cards it was obvious A and B are the pair, since both passwd -x and chage -M write to the same shadow field.

0
Full 102-350 Practice