How to turn Off linux password expiration?

erlang and dependencies

 Question : How to turn off password expiration under Linux?








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


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  chage

To 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 -1

Interactive mode command:

 # chage username


 # chage -I -1 -m 0 -M 99999 -E -1 username