Elthamtech
asked on
Lock/logoff/disable Apple Mac if network cable unplugged
Can anyone think of a way to lock/logoff/disable an iMac when the network cable is unplugged or it loses network connectivity?
Our students unplug the network cable in an effort to stop remote control and avoid managed preferences.
Running OSX Snow Leopard
Any help/ideas appreciated!
Our students unplug the network cable in an effort to stop remote control and avoid managed preferences.
Running OSX Snow Leopard
Any help/ideas appreciated!
ASKER
I am fairly new to the Mac world...Do you think you could please explain to me how that works?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The second script says there's a syntax error somewhere on this line:
if [[ -z $1 ]]; then
Expected “,” or “]” but found unknown token.
if [[ -z $1 ]]; then
Expected “,” or “]” but found unknown token.
if [[ -z "$1" ]]; then
ASKER
All good - cheers I sorted that out. Took a while to get back to it, but when I did your posts helped!
The above link shows you how to launch a process when network status changes. You can then launch a script to do what you want using launchctl when the network status goes to down - and likewise restore everything when they plug it in again.