Reports the last login date for each user on the system.
/usr/sbin/acct/lastlogin [ -X ]
The lastlogin command updates the /var/adm/acct/sum/loginlog file to show the last date each user logged in. Normally, the runacct command, running under the cron daemon, calls this command and adds the information to the daily report. However, the lastlogin command can also be entered by a user who is a member of the ADM group.
Note: You should not share accounting files among nodes in a distributed environment. Each node should have its own copy of the various accounting files.
Item | Description |
---|---|
-X | Processes all available characters for each user name instead of truncating to the first 8 characters. This flag will also cause the lastlogin command to write to the /var/adm/acct/sumx/loginlog file instead of the /var/adm/acct/sum/loginlog file. |
Access Control: This command should grant execute (x) access only to members of the ADM group.
Item | Description |
---|---|
/usr/sbin/acct | The path to the accounting commands. |
/var/adm/wtmp | The login and logout history file. |
/var/adm/acct/sum | Cumulative directory for daily accounting records. |