nixCraft Linux / UNIX / Shell Scripting Forum

nixCraft

Linux / UNIX Tech Support Forum

Time Stamp for root password change

This is a discussion on Time Stamp for root password change within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; Hi, I need to know how to determine the last time root password has been changed in CentOS and RedHat ...


Register free or login to your account to remove all advertisements.

Go Back   nixCraft Linux / UNIX / Shell Scripting Forum > Linux Distribution > CentOS / RHEL / Fedora

Linux answers from nixCraft.


CentOS / RHEL / Fedora Discussion about Redhat Enterprise Linux or CentOS or Fedora Linux related problems.

Reply

 

Thread Tools Display Modes
  #1 (permalink)  
Old 27th November 2009, 02:03 AM
Junior Member
 
Join Date: Nov 2009
OS: RedHat/Centos
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Bos52 is on a distinguished road
Default Time Stamp for root password change

Hi,

I need to know how to determine the last time root password has been changed in CentOS and RedHat linux

I know the third field in etc/shadow that shows is the number of days (since January 1, 1970 ), since the password was changed. If I understand this correctly if the password is changed today, the number should reflect the number of days that has elapsed since the January 1,1970. Is that correct?

Would there be another way to determine when the root password was changed.

Any feedback is greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old 27th November 2009, 03:54 PM
nixcraft's Avatar
Never say die
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash, Perl, Python
Posts: 3,294
Thanks: 13
Thanked 411 Times in 304 Posts
Rep Power: 10
nixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond repute
Default

Use chage command. It shows exact date of last password change:
Code:
chage -l userName
chage -l root
Sample outputs:
Code:
Last password change                    : Nov 05, 2009
Password expires                    : never
Password inactive                    : never
Account expires                        : never
Minimum number of days between password change        : 0
Maximum number of days between password change        : 99999
Number of days of warning before password expires    : 7
__________________
Vivek Gite
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Do you run a Linux? Let's face it, you need help!
Cricket & IPL News Blog
Reply With Quote
The Following User Says Thank You to nixcraft For This Useful Post:
jaysunn (28th November 2009)
  #3 (permalink)  
Old 27th November 2009, 04:33 PM
Junior Member
 
Join Date: Nov 2009
OS: RedHat/Centos
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Bos52 is on a distinguished road
Smile Time Stamp for root password change

Hi,

I appreciate for the quick response and feedback.

Thanks very much.

Regards,

Simha
Reply With Quote
Reply

Tags
centos last password change date, linux last password change data, redhat last password change date, rhel last password change date, root last password change date


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Change root password using perl script? Raj1 Solaris/OpenSolaris 8 13th June 2008 11:01 PM
how to change root password sandromax Solaris/OpenSolaris 4 11th October 2007 02:43 AM
Change root password MySQL 5 chiku Databases servers 1 16th January 2007 08:46 PM
HP UX user lock password, change password, password aging rockdalinux HP-UX 0 20th December 2006 02:36 PM
How to change time for Domino 6.5 on RHEL AS 4 vin6384 Linux software 2 8th March 2006 10:35 PM


All times are GMT +5.5. The time now is 08:08 AM.


Powered by vBulletin® Version 3.8.6 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40