Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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?
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.
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:
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
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.
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:
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):
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.