Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Create a login/logout tracking log file for all users' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a login/logout tracking log file for all users
Authored by: judielaine on Aug 18, '06 09:29:24AM

You could likely change the log rolling to not change wtmp. Or, set up a cronjob to execute last and save the output into a file you own.

Last produces binary file with the permissions

-rw-r--r-- 1 root admin 19836 Aug 18 10:09 /var/log/wtmp

The root ownership and read only permissions for non-root users prevents basic abuse. While your children may be trusted to respect parental limits, and thus your script may be fine, for system administrators who need to track usage of a machine, last is very reliable. It also logs ftp, ssh, and telnet access.

[ Reply to This | # ]