303-300 · Question #87
Which of the following commands disables the automatic password expiry for the user usera?
The correct answer is C. chage --maxdays -1 usera. chage --maxdays -1 usera disables password expiry because -1 is the special sentinel value that tells the system "no maximum age limit" - the password never expires. A is wrong because --maxdays expects a numeric argument, not the string none. B sets expiry to 99 days, which is…
Question
Which of the following commands disables the automatic password expiry for the user usera?
Options
- Achage --maxdays none usera
- Bchage --maxdays 99 usera
- Cchage --maxdays -1 usera
- Dchage --lastday none usera
- Echage --lastday 0 usera
How the community answered
(38 responses)- B3% (1)
- C89% (34)
- D5% (2)
- E3% (1)
Explanation
chage --maxdays -1 usera disables password expiry because -1 is the special sentinel value that tells the system "no maximum age limit" - the password never expires. A is wrong because --maxdays expects a numeric argument, not the string none. B sets expiry to 99 days, which is a valid but non-infinite limit. D and E use --lastday, which sets the last password change date (or a forced expiry date), not the maximum age interval - --lastday 0 actually forces immediate expiry on next login.
Memory tip: Think of -1 as "minus infinity" - it removes the upper bound entirely. Whenever a Linux tool needs "no limit," -1 is almost always the answer.
Topics
Community Discussion
No community discussion yet for this question.