I need all attributes for all users from AIX system for this I am using
"lsuser -f ALL command" this gives me all attributes but not giving lastupdate attribute which used to indicate last password change dateTime of user.
for getting lastupdate attribute I have to execute one more command
lsuser -a lastupdate ALL .
Is there any way or configuration to get lastupdate in default lsuser command like all other attributes???
(It seems like lsuser not reading etc/security/passwd file byDefault)
Thanks in advance
Best Answer
The
lastupdate
field is stored in a file that is (should be) readable only by the root user, so you will need to use sudo or some other privilege escalation method to runlsuser
. Note this section of the lsuser man page, with my emphasis in bold:Sample /etc/security directory permissions:
Sample /etc/security/passwd file permissions:
Sample /etc/security/passwd contents (showing the
lastupdate
field):Further reading: