first commit
This commit is contained in:
commit
ba848e218d
1001 changed files with 152333 additions and 0 deletions
18
shell/tools/unexpired-user.sh
Normal file
18
shell/tools/unexpired-user.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
## 密码过期续期
|
||||
# /usr/bin/chage -M 180 [username]
|
||||
if [ $# -eq 0 ];then
|
||||
echo -e "\033[31;1mUSGE:$0 [username]\033[0m"
|
||||
exit 1
|
||||
else
|
||||
while [ $# -gt 0 ];do
|
||||
user=`cat /etc/passwd | awk -F ':' '{print $1}'| grep $1`
|
||||
if [ $user == $1 ];then
|
||||
/usr/bin/chage -M 180 $1
|
||||
else
|
||||
echo -e "\033[31;1m$1 is not exists! \033[0m"
|
||||
fi
|
||||
shift
|
||||
done
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue