LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 07-25-2009, 06:12 AM   #1
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 598

Rep: Reputation: 30
How to get the root user account details


How can I get the password details for the root user in a SLES/RHEL servers?
Password Expires
Password Inactive
Account Expires
Minimum
Maximum
Warning
Last Changed
 
Old 07-25-2009, 08:28 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
See 'man chage'? If that doesn't address your question I suggest you be verbose about what you really want.
 
Old 07-25-2009, 11:31 PM   #3
ZAMO
Member
 
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 598

Original Poster
Rep: Reputation: 30
Thats It... It works

Missed that man page as lazy I was....
 
Old 07-26-2009, 12:15 AM   #4
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
Yes you can all this by chage command but there is another easy method to get this information
and this is by using /etc/shadow file. This is the file which contains all the details related to the user passwords. Lets see how shadow file gives details.
File:/etc/shadow

A. /etc/shadow file stores actual password in encrypted format for user's account with additional properties related to user password i.e. it stores secure user account information. All fields are separated by a colon ( symbol. It contains one entry per line for each user listed in /etc/passwd file Generally, shadow file entry looks as follows
FIELDS : FUNCTION
----------------------------------------------------------------
1. User name : It is your login name
2. Password: It your encrypted password. The password should be minimum 6-8 characters long including special characters/digits
3. Last password change (lastchanged): Days since Jan 1, 1970 that password was last changed
4. Minimum: The minimum number of days required between password changes i.e. the number of days left before the user is allowed to change his/her password
5. Maximum: The maximum number of days the password is valid (after that user is forced to change his/her password)
6. Warn : The number of days before password is to expire that user is warned that his/her password must be changed
7. Inactive : The number of days after password expires that account is disabled
8. Expire : days since Jan 1, 1970 that account is disabled i.e. an absolute date specifying when the login may no longer be used

The last 6 fields provides password aging and account lockout features (you need to use chage command to setup password aging). According to man page of shadow - the password field must be filled.

Thanks a lot
 
Old 07-26-2009, 05:37 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by vap16oct1984 View Post
easy method
I see what basically represents 'man 3 shadow' but I'm missing the actual implementation of your "easy method"?
 
Old 07-27-2009, 08:42 AM   #6
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
Red face

Quote:
Originally Posted by unSpawn View Post
I see what basically represents 'man 3 shadow' but I'm missing the actual implementation of your "easy method"?
Then i think you miss all the things in shadow. Yet you have not understand what the shadow is. I thing for you it's like ghost shadow.
 
  


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
"To add a new user account, log in to the root account" how do i do this (im new) pierce77x Linux - Newbie 4 12-28-2008 02:44 PM
root account or user account arodlinux SUSE / openSUSE 3 12-23-2008 08:59 PM
user account details ZAMO Linux - Enterprise 4 11-20-2008 06:22 AM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM
how to create root-like user/account? rsumbeling Linux - General 6 11-23-2004 12:38 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 02:32 PM.

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