LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-06-2011, 01:44 AM   #1
jitenderana
Member
 
Registered: Jun 2011
Location: INDIA
Posts: 70

Rep: Reputation: Disabled
Root Password is expire automatically


Dear all,
i have one problem, in my RHEL5 Operating system root password is expire after a short time and user is not login the system with set password. every time when my machine is restart firstly is change the password for the help of single user mode option.

This is big problem for me, please help.....

Regards
Jitender Rana
 
Old 11-06-2011, 01:07 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Can you run as root:
Code:
passwd -S
and post output?

Kind regards,

Eric
 
Old 11-06-2011, 01:27 AM   #3
hen770
Member
 
Registered: Oct 2010
Distribution: Arch
Posts: 136

Rep: Reputation: 7
Quote:
Originally Posted by jitenderana:4517003
every time when my machine is restart firstly is change the password for the help of single user mode option.
Have you set it to behave like that?
Any way post the above output it could help a lot.
 
Old 11-06-2011, 02:32 AM   #4
jitenderana
Member
 
Registered: Jun 2011
Location: INDIA
Posts: 70

Original Poster
Rep: Reputation: Disabled
Sir when i run this command below mentioned output is appear....

[root@oscar ~]# passwd root -S
root PS 2011-11-06 0 99999 7 -1 (Password set, MD5 crypt.)
 
0 members found this post helpful.
Old 11-06-2011, 09:49 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,750

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by jitenderana View Post
Sir when i run this command below mentioned output is appear....

[root@oscar ~]# passwd root -S
root PS 2011-11-06 0 99999 7 -1 (Password set, MD5 crypt.)
Have you looked to see what that command does?? From the man page
Code:
 -S     Report  password  status  on the named account. The first part indicates if the user account is locked (LK), has no 
        password (NP), or has an existing or locked password (PS). The second part gives the date of the last password 
        change. The next parts are the minimum age, maximum  age,  warning  period,  and  inactivity period for the password.
It's showing that you have a locked password, and it was last changed on November 6th. The minimum age is set to 0...meaning it expires instantly.

Last edited by TB0ne; 11-06-2011 at 09:53 AM.
 
Old 11-06-2011, 09:51 PM   #6
jitenderana
Member
 
Registered: Jun 2011
Location: INDIA
Posts: 70

Original Poster
Rep: Reputation: Disabled
Dear Sir thanks for explain the meaning of above command, i think my root password minimum life is 0 days thats why its change, can you explain how to change minimum maximum life of root user.

Thanks is advance.....

Regards
Jitender Rana
 
Old 11-06-2011, 10:25 PM   #7
hen770
Member
 
Registered: Oct 2010
Distribution: Arch
Posts: 136

Rep: Reputation: 7
You can change it with the chage command, i am don't remember the exact sentax though look in the man page or until i get home ;-)
 
Old 11-07-2011, 12:10 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi TB0ne,

I think you're mistaking about the minimum age meaning. From the man page I understand that it's the days that need to go by between password changes, so if it's set to 0 it means the user can change password at any time:
Code:
-n, --mindays MIN_DAYS
           Set the minimum number of days between password changes to MIN_DAYS. A value of zero for this field indicates that the user may change his/her password at any time.
There's one thing I couldn't figure out in the output from OP. The P indicates a usable password, but what does the S mean?

Kind regards,

Eric
 
Old 11-07-2011, 10:13 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,750

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by EricTRA View Post
Hi TB0ne,
I think you're mistaking about the minimum age meaning. From the man page I understand that it's the days that need to go by between password changes, so if it's set to 0 it means the user can change password at any time:
Code:
-n, --mindays MIN_DAYS
           Set the minimum number of days between password changes to MIN_DAYS. A value of zero for this field indicates that the user may change his/her password at any time.
There's one thing I couldn't figure out in the output from OP. The P indicates a usable password, but what does the S mean?
The "S" means the password is locked. And honestly, I've heard different interpretations about the minimum age and what it does, but I've never had one set to zero before, so I can't tell first hand. Since it expires/locks instantly for the OP, it seemed logical, but I'd love a better explanation.
 
Old 11-08-2011, 01:20 AM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi TB0ne,

Thanks for pointing out the significance of the S (I though L meant locked). I just checked on my system and my settings are as follows:
Code:
sudo passwd -Sa
root P 07/12/2011 0 99999 7 -1
eric P 07/12/2011 0 99999 7 -1
As you can see both have minimum age set to 0. Also the daemon users have this setting as 0. This is all on my Debian installation. I also checked on a CentOS 5.5 and got this:
Code:
passwd -S root
root PS 2011-10-04 0 99999 7 -1 (Password set, MD5 crypt.)
and I can assure you that the root account is not locked since I logged in using it, neither does it log me out on a short time interval. I'm officially kind of puzzled right now I'm all in favor of logical explanations but fail to see the logic in this one

Kind regards,

Eric
 
Old 11-08-2011, 04:48 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
For comparison, here's similar on Slackware 13.1
Code:
root@CW8:~# passwd -S
root P 10/17/2010 0 -1 -1 -1
and from the man page, with no mention of S in the second field
Code:
The status information consists of 7 fields. The first field is the user's
login name. The second field indicates if the user account has a locked password (L), has no password (NP), or has
a usable password (P). The third field gives the date of the last password change. The next four fields are the
minimum age, maximum age, warning period, and inactivity period for the password. These ages are expressed in
days.
On Debian Squeeze
Code:
root@CW8vDS:~# passwd -S
root P 03/30/2011 0 99999 7 -1
The man page is the same.

EDIT: I do not recall changing any of the settings from default.

Last edited by catkin; 11-08-2011 at 04:49 AM.
 
Old 11-08-2011, 09:12 AM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,750

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by EricTRA View Post
Hi TB0ne,

Thanks for pointing out the significance of the S (I though L meant locked). I just checked on my system and my settings are as follows:
Code:
sudo passwd -Sa
root P 07/12/2011 0 99999 7 -1
eric P 07/12/2011 0 99999 7 -1
As you can see both have minimum age set to 0. Also the daemon users have this setting as 0. This is all on my Debian installation. I also checked on a CentOS 5.5 and got this:
Code:
passwd -S root
root PS 2011-10-04 0 99999 7 -1 (Password set, MD5 crypt.)
and I can assure you that the root account is not locked since I logged in using it, neither does it log me out on a short time interval. I'm officially kind of puzzled right now I'm all in favor of logical explanations but fail to see the logic in this one
Yep...after I posted that yesterday, I looked on my system...and I've got zeros there too, but a different layout (I'm on openSUSE 11.4):
Code:
root PS 03/24/2011 -1 -1 -1 -1
user PS 03/24/2011 0 99999 7 -1
Hmmmm....
 
Old 11-09-2011, 12:45 AM   #13
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

It looks like the password settings are correct and might not be the cause for the problem OP is having.

@jitenderana: Does this only happen with the root user or is it also affecting other users on your system?

Kind regards,

Eric
 
  


Reply



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
How do you expire a password in Redhat linux? cps59 Linux - Newbie 1 07-02-2008 03:49 PM
how expire password automatically manudath Linux - Security 2 04-27-2005 12:38 AM
samba password expire Peds222 Linux - Newbie 1 03-12-2005 04:34 PM
Howto login as root with no password (automatically) vivekd Linux - Software 0 02-12-2004 04:29 AM
Samba -> Expire password Tiago Cruz Linux - Networking 6 03-05-2003 07:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:45 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
Open Source Consulting | Domain Registration