Operating System - HP-UX
1829870 Members
1933 Online
109993 Solutions
New Discussion

Hpux-11.23-Know the date of creation of a user

 
David_711
Frequent Advisor

Hpux-11.23-Know the date of creation of a user

Hi,
I have a hpux 11.23 operating system.I need know what is the date of creation of any user on the system?
Somebody know what command or how i can do this?
Please help
Thanks,
David
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: Hpux-11.23-Know the date of creation of a user

Hi David:

You can't expect by inference, as for instance, the presence of other files and/or the timestamp associated with an untouched directory.

UNIX does *not* maintain a creation timestamp. The closet thing is the 'mtime' (modification) timestamp field (see 'stat(2)'.

Unfortunately, for your purpose, any modificaton to a file updates this value. Any addition or deletion of files in a directory updates the directory's 'mtime'.

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: Hpux-11.23-Know the date of creation of a user

Shalom,

Best you can do is passwd -sa

This provides password expiration and related information.

If you need this information stop using useradd to add new users. Write a small shell script that writes to a log file when it creates users.

This also provides you a chance to customize the user environment.

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
Yang Qin_1
Honored Contributor

Re: Hpux-11.23-Know the date of creation of a user

Hi, David, the other way to "guess" the user creation date is to check .profile, .kshrc, .login file. If user have not changed those files, then they will keep the creation date as time stamp.


Yang