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 that has some valid uses in some environments when a Mac at screensaver mode shouldn’t require a login, but waking from sleep should.
Here’s how to accomplish this rather unique login authentication requirement on a Mac:
Selectively Requiring Login Password on Mac Wake from Sleep, But Not Screensaver
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 which then changes the behavior requiring login authentication back to default.
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.
[…] 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 […]
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:
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
This doesn’t seem to work with Snow Leopard anymore. Can someone confirm this or help me, please? ;)
you right like always.
Password is the base of safety…
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.
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.
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?