chage -E 2012-12-31 ACCOUNT_NAME #set account expire at 2012/12/31, account actually get deny login at 2013/1/1
chage -l ACCOUNT_NAME #display account expiry information
echo $(($(date --date="2012/12/31" +%s)/86400+1)) #caculate number of days since January 1st, 1970, number is: 15705
so we grep ACCOUNT_NAME from /etc/shadow and found:
ACCOUNT:DFdgfdfg3345dg#$%:14466:0:99999:7::15705:
#1. 試用user_config_dir, 透過crontab設定某user於特定時間更換user conf, 看是設成read only或是local_max_rate=1
#2. 或是crontab時間到就echo "ACCOUNT_NAME">>userlist_file...
沒有留言:
張貼留言