Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > OS X > Mac OS X Server, Xserve, and Networking

Thread Tools Search this Thread Display Modes
Old Jul 28, 2010, 06:32 AM   #1
macrumors newbie
Join Date: Mar 2009
log-out script


Where I should insert log-out script in mac os 10.5 ?

I would like control which time users login to computer and which time log out.

I made login script:

mkdir /Volumes/log
mount_smbfs '//@svbk/LOG$' /Volumes/log
echo "$(date "+%Y-%m-%d, %T"), $(users), LOG-IN" >> /Volumes/log/logmac.rtf
umount /Volumes/log
killall Terminal

and logout script:
mkdir /Volumes/log
mount_smbfs '//@svbk/LOG$' /Volumes/log
echo "$(date "+%Y-%m-%d, %T"), $(users), LOG-OUT" >> /Volumes/log/logmac.rtf
umount /Volumes/log
killall Terminal

but I don't now where I should insert logout script.
may somebody have a better idea to control time login,logout ?

Thx for help!!!
olej is offline   0 Reply With Quote
Old Jul 28, 2010, 10:08 PM   #2
macrumors 68040
calderone's Avatar
Join Date: Aug 2009
Location: Seattle
You can do this with hooks.

defaults write LoginHook /path/to/
defaults write LogoutHook /path/to/
This requires elevated rights, so you will need to pop a sudo in front of those.

calderone is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > OS X > Mac OS X Server, Xserve, and Networking

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Run Script with Administrative Privileges during PackageMaker Installation rebello95 Mac Programming 0 Nov 7, 2011 11:27 PM
looking for a specific automation/script for itunes ... > eroxx OS X 0 Jun 4, 2011 07:17 PM
Anyone know where I can hire/commission a task to create script? Lifequest Mac Programming 2 May 23, 2011 12:52 PM
Applescript shell script won't run when display is sleeping BlueRevolution Mac Programming 6 Feb 19, 2011 03:11 AM
iTunes Script Help jason1989 Mac Programming 1 Jan 24, 2011 11:45 AM

All times are GMT -5. The time now is 06:53 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013,, LLC