Require password to wake computer by specific condition I'd like to require password to wake my Macbook Air running Mavericks when it is not in my home. 

So if it was not connected to my home wifi, then I'd like it to require password to wake from sleep or screen saver. And else, I'd like it to require password.

Can that be done?
You can use ControlPlane:


Add a context named home from the contexts tab.
Enable the nearby WiFi network evidence source from the evidence sources tab.
Go to the rules tab and add a nearby WiFi network rule that sets the context to home.
Add two screen saver password actions from the actions tab:




Another option is to add a line like this to crontab:

* * * * * system_profiler SPAirPortDataType|grep -q 'network name'&amp;&amp;x=false||x=true;osascript -e 'tell application "System Events" to tell security preferences to set require password to wake to '$x