Question : How to turn off password expiration under Linux?
Answer:
The Encrypted password list is stored in /etc/shadow file
cat /etc/shadow root:$1$dkk&Iw6zvgu$P3ms0o5GiXv66BzNXe0:15294:0:99999:7::This is the explanation of the above line
{userName}:{password}:{lastpasswdchanged}:{Minimum_days}:{Maximum_days}:{Warn}:{Inactive}:{Expire}:
Under Linux, to turn off the password expiration we use a tool called “chage” you can download it via yum or apt-get package managers tools.- For Debian based install chage using the command
apt-get install chage
- For Fedora/RHEL based, install using the command:
yum install chageTo disable password aging / expiration for user foo, type command as follows and set:
Minimum Password Age to 0 Maximum Password Age to 99999 Password Inactive to -1 Account Expiration Date to -1Interactive mode command:
# chage usernameOR
# chage -I -1 -m 0 -M 99999 -E -1 username
No comments:
Post a Comment