On Linux it is important to control the users passwords expiration. The password expiration information is stored in /etc/shadow.
Inspect the password expiration from one user:
# chage -l testuser
Inspect the password expiration from one user:
# chage -l testuser
Last password change : Aug 21, 2014
Password expires : Sep 21, 2014
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 30
Number of days of warning before password expires : 7
Inspect the password expiration from all the users(Script):
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 30
Number of days of warning before password expires : 7
Inspect the password expiration from all the users(Script):
for i in `cat /etc/passwd | awk -F: '{print $1}'`; do echo "UserName:${i}"; chage -l $i|grep "Password Expires" ;done
Disable the password expiration from one user:
# chage -I -1 -m 0 -M 99999 -E -1 testuser
0 comments:
Post a Comment