How To Set Never Expire Password In Linux Command?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Set the password to never expire by adding to the /etc/shadow file:
username:password:lastchg:min:max:warn:inact:expire:flag
2. Replace the “expire” field with -1. This will set the password to never expire.
3. Save the changes to the /etc/shadow file.
4. Restart the system for the changes to take effect.