Locking OS x remotely

Newbify2

Limp Gawd
Joined
Mar 28, 2002
Messages
380
Is there a way to lock a remote os x machine remotely through the terminal. This way one can update the machine without users using it and then reboot the machine.
Thanks
 
Yep.

Code:
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend

It brings you to the login window. I'm not sure if this works remotely, but it "should."
 
Yes it works locally. I want to be able to prevent logging into the system.
 
'shutdown -k' might be what you are looking for. just 'man shutdown' to see. otherwise you might just have to run an applescript to do it.
Code:
ignoring application responses
tell application "loginwindow"
«event aevtlogo»
end tell
end ignoring
 
Back
Top