1825770 Members
1989 Online
109687 Solutions
New Discussion

Account creation date

 
Gamaliel
Frequent Advisor

Account creation date

Hi,
I want to know how can i list the creation date of an Unix User account
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: Account creation date

You really can't unless you maintain some sort of database yourself. Nothing in the Trusted or standard UNIX passwd database keeps those data. You might be able to look at the timestamps of some of the data files in the user's home directory but even then if you know it, it's only by accident. UNIX has no way of knowing when a file was created either but the most likely candidate would be to look for the user's home directory's ctime (change time); not the same as mtime.
If it ain't broke, I can fix that.
Rick Garland
Honored Contributor

Re: Account creation date

This information is not stored by default.

Some kind of external record keeping is required to maintain this information
Steven E. Protter
Exalted Contributor

Re: Account creation date

Shalom Joaquin,

The user create script can make a log record with a command like this:

echo $username 'date' >> $USERLOG

Or you can go with a trusted system.

Or you can save the same logs if you create users with sam.

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
Andy Torres
Trusted Contributor

Re: Account creation date

Just a shot in the dark, but if you created the user fairly recently in SAM you may be able to use samlog_viewer to filter your samlog, searching for the username.

Your options are limited without actively logging user creation yourself.