5 pts.
 AS400 command to view all users last login
Hi There,

I need to find a command that will list all users last login. Also all disabled accounts. For Audit purposes

 

Thanks :)



Software/Hardware used:
ASKED: May 22, 2010  5:03 AM
UPDATED: June 6, 2010  8:43 AM

Answer Wiki:
DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) OUTFILE(MYLIB/MYFILE) it will create a Physical file from this physical file you can get the details.
Last Wiki Answer Submitted:  May 24, 2010  1:34 pm  by  chenthil   465 pts.
All Answer Wiki Contributors:  chenthil   465 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

You can use the Print User Profile command and it will give you the information you are needing.

PRTUSRPRF TYPE(*PWDINFO)

You can prompt the command and select different options but the one above should give you what you want at this time.

 1,145 pts.

 

Both DSPUSRPRF USRPRF(*ALL) and PRTUSRPRF TYPE(*PWDINFO) provide lots of info, but there doesn’t seem to be any option that gives UID number. Any suggestions?

 15 pts.

 

…there doesn’t seem to be any option that gives UID number.

DSPUSRPRF for an individual profile will display UID on screen. Or DSPUSRPRF *ALL TYPE(*BASIC) to an outfile will include UID for every profile in the output file if you have sufficient authority. It’s far out near the end of the record around position 2039. The outfile column heading is USER ID NUMBER.

Tom

 108,215 pts.

 

…a command that will list all users last login…

Login to what?

Login to the database? To a telnet session? To the remote command server? To something else?

There are lots of ways to log in. The user profile value tracks telnet, but it won’t tell you if the user did a database login nor most of the others.

Tom

 108,215 pts.