Operating System - HP-UX
1833046 Members
2378 Online
110049 Solutions
New Discussion

how to find creation time of a user?

 
sukumar maddela
Occasional Advisor

how to find creation time of a user?

Hi all,

I would like to find the time when a particular user is created. can i find in any log file. or otherwise using stat system call or any other functions can i find that time. plz help me.


Thanks in advance.

Regards,
M.Sukumar
6 REPLIES 6
R.O.
Esteemed Contributor

Re: how to find creation time of a user?

Hi,

You can look at the time of the files .login , .kshrc , .exrc , .cshrc ... if they weren't used, thet will give you the date of the creation of the user.

Regards,
"When you look into an abyss, the abyss also looks into you"
sukumar maddela
Occasional Advisor

Re: how to find creation time of a user?

is there any ohter way..
R.O.
Esteemed Contributor

Re: how to find creation time of a user?

Hi,

¿Have you tried lo look at samlog through sam?? Obiously, it will work for you if the user was created by sam

Regards,
"When you look into an abyss, the abyss also looks into you"
Peter Godron
Honored Contributor

Re: how to find creation time of a user?

Hi,
if the user was created recently using SAM, there may be something in the samlog.
Otherwise no specific log exists for this, unless auditing was switched on.

Best guess would be to use the oldest file in the users directory, or go through all your backups and check when the users home-dir apears.
Mustafa Gulercan
Respected Contributor

Re: how to find creation time of a user?

might try looking at the creation date of their home folder/profile
James R. Ferguson
Acclaimed Contributor

Re: how to find creation time of a user?

Hi:

There is no *creation* timestamp maintained for files in Unix. The closest thing is the last *modification* timestamp which at the time a file is first created will represent a creation date/time. Thereafter, any change to the content of the file or directory alters the 'mtime' (modification timestamp). A 'touch' can be used to alter a file's timestamps. For more information, see 'stat(2)', 'utime(2)' and 'touch(1)'.

Regards!

...JRF...