Which command would set a user's password to expire in 90 days and warn 7 days before expiration?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which command would set a user's password to expire in 90 days and warn 7 days before expiration?

Explanation:
Managing when a password must be changed is done with the chage command. The two key options are -M, which sets the maximum number of days the password is valid, and -W, which specifies how many days before that expiry to warn the user. Setting -M to 90 means the password will expire after 90 days, and setting -W to 7 makes the system start warning the user 7 days before the expiry. Using both for the target user with chage -M 90 -W 7 username gives the desired behavior: a 90-day password life with a 7-day warning window. Other choices don’t fit: a passwd option set is not appropriate for this aging configuration; -e would define an absolute account expiration date, not a password expiry; -m would set a minimum interval between changes, not the expiration itself.

Managing when a password must be changed is done with the chage command. The two key options are -M, which sets the maximum number of days the password is valid, and -W, which specifies how many days before that expiry to warn the user. Setting -M to 90 means the password will expire after 90 days, and setting -W to 7 makes the system start warning the user 7 days before the expiry. Using both for the target user with chage -M 90 -W 7 username gives the desired behavior: a 90-day password life with a 7-day warning window. Other choices don’t fit: a passwd option set is not appropriate for this aging configuration; -e would define an absolute account expiration date, not a password expiry; -m would set a minimum interval between changes, not the expiration itself.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy