Require a password on waking from sleep, but not when screensaver is active
Have you ever wanted to have your Mac require a password on waking from system sleep, but not ask for a password when the screensaver is on or the screen was locked? Well, me neither, but someone out there might and it’s kind of a nifty customization tip. Here’s how to do it:
Launch the Terminal from the /Applications/Utilities directories, and type the following defaults write command:
defaults -currentHost write com.apple.screensaver askForPassword -int 0
Reversing this should just be a matter of changing the 0 to a 1
defaults -currentHost write com.apple.screensaver askForPassword -int 1

I came across this nice trick on TUAW that I thought it was worth reposting here to our readers.

The string with 0 (zero) unchecks the option for asking a password completely (in my OSX v10.5.6). So after after ending the screensaver as well as awakening from system sleep, no password is asked.
What can be wrong? I assume that the option should stay active?
Thanks
I have oposit situation.
I used string with 0 (zero) and I have password protection in both action (scr saver and after awakening from sleep mode. It happened after first sleep mode cycle.
Strange, verry strange.
If somebody knows how and why, it will be nice to read it.
This command toggles the “Require password to wake this computer from sleep or screensaver” preference and does not seem to result in a separate setting for just the screensaver. You can, however, use this command along with Bernhard Baehr’s sleepwatcher script to toggle this preference on when the computer sleeps and off again when it wakes. Just install sleepwatcher and place the appropriate commands in files named .sleep and .wakeup at the root level of your home directory.
Password is the base of safety…
you right like always.
This doesn’t seem to work with Snow Leopard anymore. Can someone confirm this or help me, please?
The same problem, it doesn’t work anymore under Snow Leopard, as I remember in Tiger that could be easily set without tweeking in console
en the screensaver is on? Well, me neither, but someone out there might and it’s kind of a nifty customization tip. I came across this nice trick on TUAW that I thought it was worth reposting here to our readers.
Launch the Terminal and type the following command:
[...] Require a password on waking from sleep, but not when screensaver is active Require a password on waking from sleep, but not when screensaver is active [...]