LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-28-2012, 11:58 AM   #1
johnmccarthy
Member
 
Registered: Jul 2010
Posts: 64

Rep: Reputation: 1
Wink How Allow root password to expire


Our government customer has expressed that our RHEL 5 root account must have an expiration date. He observed our /etc/shadow file and found that root account is set to 99999 (many many years). How can I safely set the root password to expire after 90 days?

A million thanks
Johnny Mac

Very new to Linux and don't want to mess up the root account
 
Old 08-28-2012, 12:07 PM   #2
kedarp
Member
 
Registered: Jul 2012
Distribution: Ubuntu
Posts: 197
Blog Entries: 3

Rep: Reputation: 23
Go through the man page of the shadown file

#man shadow

You will find all the details of the shadow fields.

Regards.

Last edited by kedarp; 08-28-2012 at 12:11 PM.
 
Old 08-28-2012, 09:56 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
http://linux.die.net/man/1/chage
Quote:
-E, --expiredate EXPIRE_DATE
Set the date or number of days since January 1, 1970 on which the user's account will no longer be accessible. The date may also be expressed in the format YYYY-MM-DD (or the format more commonly used in your area). A user whose account is locked must contact the system administrator before being able to use the system again.

Passing the number -1 as the EXPIRE_DATE will remove an account expiration date.

-M, --maxdays MAX_DAYS
Set the maximum number of days during which a password is valid. When MAX_DAYS plus LAST_DAY is less than the current day, the user will be required to change his/her password before being able to use his/her account. This occurrence can be planned for in advance by use of the -W option, which provides the user with advance warning.

Passing the number -1 as MAX_DAYS will remove checking a password's validity.
Expire & duration are 2 different things...

See also http://linux.die.net/man/5/login.defs for defaults
 
1 members found this post helpful.
Old 08-28-2012, 11:29 PM   #4
kedarp
Member
 
Registered: Jul 2012
Distribution: Ubuntu
Posts: 197
Blog Entries: 3

Rep: Reputation: 23
Yes, chage will write to the same shadow file. Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Root Password is expire automatically jitenderana Linux - Desktop 12 11-09-2011 01:45 AM
how expire password automatically manudath Linux - Security 2 04-27-2005 01:38 AM
samba password expire Peds222 Linux - Newbie 1 03-12-2005 05:34 PM
Warning: your password will expire in 0 days dragon Linux - Security 5 05-27-2004 03:53 AM
Samba -> Expire password Tiago Cruz Linux - Networking 6 03-05-2003 08:21 AM


All times are GMT -5. The time now is 06:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration