|
|
Login/out logs?
|
|
|
|
Mac Elite
Join Date: Jul 2002
Status:
Offline
|
|
Where is a log of login/outs kept? I've tried nearly all the log files I can find and nothing has it. I'm trying to report the login/outs and times for a lab of computers to one central server. Any recommendations for that would be welcome too. Thanks.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
I don't think there is a log of GUI logins.
You could pretty easily add one though.
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
|
|
|
|
|
|
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
Originally posted by Arkham_c:
You could pretty easily add one though.
care to share?
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by philzilla:
care to share?
The login is easy. Add a login item to /Library/Preferences/loginwindow.plist that logs the login of a user.
The logout could be handled by the same app, when it is asked to quit.
I could whip up a Realbasic app to do that in about 2 minutes.
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
Fire up terminal.
Run last
Be happy.
- proton
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status:
Offline
|
|
To isolate GUI logins within the last month:
last | grep console
(Previous month's logs are gzipped in /var/log when the monthly script runs).
Or, as Arkham_c suggested, you can add a loginhook to log the user logins. In fact, that is the very example Mike Bombich uses with his LoginWindow Manager application:
http://www.bombich.com/software/lwm.html
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jul 2002
Status:
Offline
|
|
Where does last get it's information? I'm more interested in remotely reporting logins than anything. I know that I could run a logout script to report it, but I'd rather have something automated, like syslogd can do. I'd also like to report certain system events, like sudo attempts.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by Thinine:
Where does last get it's information? I'm more interested in remotely reporting logins than anything. I know that I could run a logout script to report it, but I'd rather have something automated, like syslogd can do. I'd also like to report certain system events, like sudo attempts.
last uses /var/log/wtmp
I didn't realize that it would log the GUI logins, but that could suit your needs.
Just know that the wtmp file is not a regular text file. The entries are encoded as fixed-size byte entries, so some translation would be required if you choose not to use "last" (which does this for you).
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|