chage is used to list and change the password expiry information of auser.
chage -l beyes
执行后出现如:
Minimum: 0
Maximum: 99999
Warning: 7
Inactive: -1
Last Change: 12月 12, 2008
Password Expires: Never
Password Inactive: Never
Account Expires: Never
chage -d 2008-12-14 beyes
chage -m 7 beyes //指定 beyes 的密码至少要用7天才能变更密码
chage -M 7 beyes //要求每隔7天就要变更一次密码
change -I 3 beyes //3 天后 beyes 若还不变更密码则锁定帐户
chage -E 2009-01-01 beyes //指定在09年元旦时密码到期
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |