terça-feira, março 13, 2012

Command chage

chage - change user password expiry information.

Information root.
#chage -l root

-M option maxdays is the maximum number of days during which a password is valid, 0 user maykon will be required to change password.
#chage -M 7 maykon

-W set the number of days of warning before a password change is required.
#chage -W 7 maykon

root@slack:~# login
slack login: maykon
Last login: Tue Mar 13 09:36:16 -0300 2012 on pts/0.
Your password will expire in 7 days.
No mail.

-E set a date on which the user's account will no longer be accessible, this option is the number of days since January 1, 1970.
#chage -E 8 maykon
Account Expires: Jan 09, 1970 ;-).

Nenhum comentário: