Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

History password changes

Status
Not open for further replies.

shoux

Technical User
Nov 9, 2000
83
MY

Where to find the history/log user password changes.

Thanks a lot
Shoux shoux
 
Hi shoux,
files /etc/security/passwd and /etc/security/opasswd contain information about last password updating. File var/adm/sulog contains history of issue passwd command.
Regards Boris.
 
Boris,
Thank for your response. but I want to know the exect date.is there any conversion needed.FYI, I'm new in AIX

example my /etc/security/opasswd
user1:
password = hw0jHfAdWo3Xw
lastupdate = 1038878091
flags =

Thank you
Shoux shoux
 
Hello Shoux,
if you have C compiler the program below helps you
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void main(int args, char *args[])
{
time_t cl = 0;
char *tt;
cl = atol(args[1]);
tt = ctime(&cl);
printf(&quot;\n%s&quot;, tt);
}

for example it name ConvTime.c

compile it:
$ cc -o ConvTime ConvTime.c

in your example:
$ ConvTime 1038878091
Tue Dec 3 04:14:51 2002

Regards Boris
 
If you don't have a C compiler you can do it via perl.
ie, set up an alias in your .profile:
alias ConvTime=&quot;perl -le 'print scalar localtime(shift);'&quot;

logout, then back on again and:
$ ConvTime 1038878091
Tue Dec 3 02:14:51 2002
 
Hi boris & Recheal
FYI, my system doesn't have C and Pearl compiler. Are there any AIX commands to convert the date? If it is virtuous, I might use the program in my daily routine job. Anyway thanks for your help to get users1 date.

Regards
Rosli shoux
 
shoux - what version of AIX is this? AFAIK perl has been shipped on the base o/s disks since 4.3.3.
 
Remember that this time stamp is the number of seconds from the birth of unix ~ Jan 1 1970. So if you can do the math and get close.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top