System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to view created date of the one user id in HPUX and Linux?

SOLVED
Go to solution
senthil_kumar_1
Super Advisor

How to view created date of the one user id in HPUX and Linux?

Hi All,

I need to view created date of the one user id in HPUX and Linux.

Is it possible?
4 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: How to view created date of the one user id in HPUX and Linux?

Hi Senthil:

Unix neither has nor keeps a "creation date".

In Unix, the closest you come to a creation timestamp is the modification ('mtime') value. At the moment a file is first established, its 'mtime' represents a creation timestamp. Thereafter, any change to the data is reflected in an updated 'mtime'.

For directories, the 'mtime' changes when files and subdirectories are added or removed.

Hence, unless you *document* the creation moment, you are left with only inferences to describe its birthday.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: How to view created date of the one user id in HPUX and Linux?

You can look at the date stamps of the files in the users' home directory. That will give you an approximate time. Assuming you use SAM to add users, the users are added to the end of the password file so the order of the entries provides some chronological hints, but not dates.


Pete

Pete
Steven E. Protter
Exalted Contributor
Solution

Re: How to view created date of the one user id in HPUX and Linux?

Shalom,

I would suggest that passwd -sa can provide you some of what you want.

If your system is trusted, you might want to look at the audit database for more information.

The create time of the user .profile in Linux or .bashrc and other files is a good indicator of create time, unless of course the user name was re-used.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Raj D.
Honored Contributor

Re: How to view created date of the one user id in HPUX and Linux?

Senthil,

In hp-ux , it is hard to find out user creation date but you can those mentioned above :

Also try:
# finger username

-It will give you some clue.

-If the user never logged in you can find the creation date from the users home directory files. # ls -lrt ~username

i.e look at the timestamp of.profile , .history .cshrc etc.



In Linux:(redhat):
If auditing is enabled most of the information about user creation can be found using with the audit logs and ausearch command:
# ausearch -c useradd


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "