Linux Foundation Certified System Administrator: Changing User Account Aging Information

Change User Account Aging: Commands & Methods

Question

Which commands can be used to change a user's account aging information? (Choose THREE correct answers.)

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

ABD

The correct answers to the question are A) usermod, D) chage, and B) passwd.

A) usermod - usermod is a command used to modify user account settings. With the -e or --expiredate option, you can set an account expiration date for a user account. For example, the following command sets the account expiration date for the user "johndoe" to December 31, 2023: sudo usermod --expiredate 2023-12-31 johndoe

D) chage - chage is a command used to modify the password aging information for a user account. With chage, you can set the minimum and maximum password age, the warning period before expiration, and the inactivity period before the account is locked. For example, the following command sets the minimum password age for the user "johndoe" to 7 days: sudo chage --mindays 7 johndoe

B) passwd - passwd is a command used to change a user's password. With the -e or --expire option, you can set an account expiration date for the user's password. For example, the following command sets the password expiration date for the user "johndoe" to December 31, 2023: sudo passwd --expire 2023-12-31 johndoe

C) chattr - chattr is a command used to change file attributes such as read-only, hidden, or immutable. It is not used to change user account aging information.

E) chsh - chsh is a command used to change the user's login shell. It is not used to change user account aging information.

In conclusion, usermod, chage, and passwd are the commands used to change a user's account aging information.