I am trying to speed up my enabling and disabling of the security/password feature on OS X. Specifically in this case Mountain Lion 10.8.4.
I currently have a hot corner (Plus the shortcut ctrl + shift + EJECT) set to start my screensaver on my Mac. This in turn requires a password immediately after the screensaver has kicked-in. I use this feature when working in an environment where I wish to secure my active Mac in a shared situation.
I am trying to enable, from the terminal, a quick way to enable or disable the "Require password X after sleep or screen saver begins".
I have tried
defaults -currentHost write com.apple.screensaver askForPassword -int 0 defaults -currentHost write com.apple.screensaver askForPassword -int 1
which seems to update /Users/USER/Library/Preferences/com.apple.screensaver.plist successfully.
However when manually updating or using the terminal to update
, it seems to be getting ignored, thus nothing is functionally changing.
I'd prefer to do it from the terminal if possible but am open to other suggestions if not. So far all commands are run as non-root.
Any Help or guidance on the matter is more than welcome