Display trainee's last password change, expiration, minimum and maximum days, warning period, and account expiration.
Do not change any values.
Which command is appropriate?
chage -l USER lists password-aging and account-expiration values in a human-readable form.
Detailed explanation
chage -d traineeIncorrect. -d requires a last-change date value and is not a listing operation.
Incorrect. -d requires a last-change date value and is not a listing operation.
chage -M traineeIncorrect. -M requires a maximum-days value.
Incorrect. -M requires a maximum-days value.
chage -W traineeIncorrect. -W requires a warning-days value.
Incorrect. -W requires a warning-days value.
chage -l traineeCorrect. It lists trainee's aging information.
Correct. It lists trainee's aging information.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' '-l=list aging information' '-M=maximum days' '-W=warning days' '-d=last change date'Expected result
-l=list aging information
-M=maximum days
-W=warning days
-d=last change dateKey points
- -l means list
- Check password expiration
- Account expiration is included
Notes
- Environment: shadow-utils chageのoption対応表
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.