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.
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?
…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.
…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.