AS400 command to view all users last login

5 pts.
AS400 output queue sort search
Output Queues
Hi There,

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


Thanks :)

Answer Wiki

Thanks. We'll let you know when a new response is added.


it will create a Physical file

from this physical file you can get the details.

Discuss This Question: 6  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • hafwhit
    You can use the Print User Profile command and it will give you the information you are needing.
    You can prompt the command and select different options but the one above should give you what you want at this time.
    1,175 pointsBadges:
  • Bbogar
    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 pointsBadges:
  • TomLiotta
    ...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
    125,585 pointsBadges:
  • TomLiotta
    ...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
    125,585 pointsBadges:
  • surfettekw
    TomLiotta - Excellent point! I was trying to determine if our 90 day no use (to disable id) was working - reviewing the data I see some with an old log in date - they are still enabled and I am pretty sure I saw some transactions in the audit log for these "non-human" IDs. Do you know how to verify last use beyond the standard telnet login session?

    Thank you in advance!!!!!!!!

    20 pointsBadges:
  • TheRealRaven
    @surfettekw: First, what are the implementation details of that process? There are a few ways a 90-day process might be done. How is yours done? But second, how have you tracked logons? If the info isn't logged and saved, it can't be reviewed.

    Potential logging sources might be the system audit journal and the QHST message queue (and its log files). Another possibility could be any logging by exit programs for accesses through TCP/IP and host servers. Others might be in use.
    24,405 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: