Google Plus

How to turn Off linux password expiration?

Written by Mel Kham on . Posted in Frequently Asked Questions, linux command

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

OR

 # chage -I -1 -m 0 -M 99999 -E -1 username
For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

Nova

|

I wonder if there is a way to create your own themes.

Red Adaya

|

Thank you! This worked for me!!!

SK

|

Andrew look into your httpd.conf file at line no 350. There might be a syntax error.

andrew

|

hello I have this error

[root@cloud html]# /etc/init.d/httpd restart

then this appears

Starting httpd: httpd: Syntax error on line 350 of /etc/httpd/conf/httpd.conf: without matching section.

plz tell how to fix this.

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .