Operating System - HP-UX
1830616 Members
2659 Online
110015 Solutions
New Discussion

To know when the user account has been created

 
mparasur
Advisor

To know when the user account has been created

Hi All,

I would like to know when the user account has been created in a hp-ux machine. Is it possible to get the time and date of when the user account has been created.
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: To know when the user account has been created

I don't believe this is stored anywhere. You can take a look at the user's home directory and the files within it. There are usually some files that never get used and the dates on those files should tell you when the user was created.


Pete

Pete
sreekanthtm
Trusted Contributor

Re: To know when the user account has been created

Hi,

I think there is database maintained in HPUX for user account creation timestamp. But you you can check the time stamp of the files created at the time of user creation. ie; Home directory of that user or any other related file.

Rgds
Sreekanth


Frank de Vries
Respected Contributor

Re: To know when the user account has been created

Hi,

You can keep a tag on the password file to
see when a change was made and check the difference with a snapshot of the previous version of the password file.

should be fairly easy to script,
conceptually like this:

ls -l passwd | cut timestamp
if timestamp = prevtimstampt
then
do nothing
else
diff passwd passwd.snapshot
fi

Run in cron every minute.
Look before you leap
sreekanthtm
Trusted Contributor

Re: To know when the user account has been created

Srry..... There is no database.
Victor Fridyev
Honored Contributor

Re: To know when the user account has been created

Hi,

The answer depends on the sysadm style. If new users are created by SAM, you can look for these items in samlog, if there is a script for users creation, read it logfile, else take a look on the oldest file in users' directories.
I create users by a script and put creation date into /etc/passwd, together with the user's owner name and email. Also .forward file is created with the email in it.

HTH
Entities are not to be multiplied beyond necessity - RTFM