Require Password for Sleep but Not Screensaver

coastertux

macrumors regular
Original poster
Jul 17, 2006
155
0
Is it possible to require a password when returning from sleep but not from the screensaver?
 

theman5725

macrumors 6502
Aug 2, 2006
388
0
I know that you can put a password on to wake up from sleep but I have never tried it before so I wouldnt know its effect on the screen saver and what.
 

heatmiser

macrumors 68020
Dec 6, 2007
2,431
0
Anyone have an answer? I'd like to lock it for coming out of sleep but not for coming out of the saver.
 

kolax

macrumors G3
Mar 20, 2007
9,186
115
Why?! The screensaver will come on if you are AFK, and makes sense to require password to stop other people trying to access your data. Seems stupid to have it on for sleep but not for screensaver.

I have the bottom left of my screen as an 'active screen corner'. If I put my mouse there for a few seconds, the screensaver starts. Ideal, means if I'm nipping out of my room for a few minutes and don't want anyone to touch my computer, just move the mouse and it is secure.
 

ergdegdeg

Moderator emeritus
Oct 13, 2007
1,628
0
The best solution I found is setting the screensaver so it does not require a password to wake up again and then putting the keychain in the menu bar (Applications > Utilities > Key Chain > Preferences > Show status in menu bar). So I can lock the screen whenever I want to without locking it all the time.
 

heatmiser

macrumors 68020
Dec 6, 2007
2,431
0
Why?! The screensaver will come on if you are AFK, and makes sense to require password to stop other people trying to access your data. Seems stupid to have it on for sleep but not for screensaver.
My screensaver is a clock. It's an advantage to be able to have it start running without having to log in each time I'd like to use the computer again. This is something you can do in Windows, by the way.

ergdegdeg said:
The best solution I found is setting the screensaver so it does not require a password to wake up again and then putting the keychain in the menu bar (Applications > Utilities > Key Chain > Preferences > Show status in menu bar). So I can lock the screen whenever I want to without locking it all the time.
Thanks. The only problem with this is that one would have to click the keychain when putting the computer to sleep, in order to have it take effect when waking the computer again. It would be great if there were simply a way to set the password independently for both functions.
 

kolax

macrumors G3
Mar 20, 2007
9,186
115
My screensaver is a clock. It's an advantage to be able to have it start running without having to log in each time I'd like to use the computer again. This is something you can do in Windows, by the way.
So you use your computer as a clock..?

Only alternative I can think of is turn off the require password to wake from sleep and enable fast user switching.

Then, when you are going to put your computer to sleep, click 'Login Window' and then put it to sleep. That way, when you wake it, it will ask for the password since it is displaying the login window.

 

cogorno

macrumors newbie
Mar 12, 2008
2
0
Why?! The screensaver will come on if you are AFK, and makes sense to require password to stop other people trying to access your data. Seems stupid to have it on for sleep but not for screensaver.
Kilamite,

Here is why I want to lock only on sleep, not for screen saver.

About 90% of the time, my laptop is at home. I live alone, and nobody is going to have access to my laptop the vast majority of the time. I don't want the screen saver to require a password because this messes up Front Row (it will crash the computer if I try to start Front Row using the remote while the screen saver is active).

Anyway, I use sleep much like a fast logout. When I am going to be away from the machine, I put it to sleep.

To answer the original poster's question, I don't believe it is possible to separate the password behavior for sleep and screen saver.

I filed an RFE with Apple in December about this behavior, but it hasn't been addressed yet.

-Steve
 

mijkal

macrumors newbie
Apr 28, 2009
1
0
Answer: Require password from sleep but not screensaver

Here's the answer:

Enable 'Require password ...' in Security panel General tab. Then paste this in Terminal:

defaults -currentHost write com.apple.screensaver askForPassword -int 0​

To undo:
defaults -currentHost write com.apple.screensaver askForPassword -int 1
 

cogorno

macrumors newbie
Mar 12, 2008
2
0
Here's the answer:

Enable 'Require password ...' in Security panel General tab. Then paste this in Terminal:

defaults -currentHost write com.apple.screensaver askForPassword -int 0​

To undo:
defaults -currentHost write com.apple.screensaver askForPassword -int 1

Thanks!!! This works great!

-Steve
 

jg167

macrumors newbie
Dec 23, 2007
11
2
Thanks!!! This works great!

-Steve
This did not work for me on MacOS X 10.6.2 . It has some odd behavior. Turning on the security require password indeed had the exptected effect. But executing the default did not. The password was still required when the screen saver is stopped. Oddly at this point the require password bit is off in the system prefs (but in fact still on). To get it to turn off you have to set it back on, then off again.

This is on a Santa Rosa MacBookPro running with an external display with the lid closed, but I wouldn't expect that to be an issue.
 

bagpuss

macrumors newbie
Sep 25, 2008
11
0
Hello, I would really like a solution for this too, please!
My reason? Much of the time my mid 2009 MBP runs closed with an LED Cinema Display. It's in a secure place, so I don't need the password.

But I regularly unplug it, chuck it in a bag and go out. Then I do...

I currently have it set to ask for a password after an hour, which saves some pain when the screensaver (display off) activates. But when going out, I could lose my laptop in under an hour, and someone else could just open it and they'd be in!

Hence, I would like screen saver/display off: never request a password; sleep: always request a password.

Any ideas?
Thanks!

No? Nothing?
:(
 

r0k

macrumors 68040
Mar 3, 2008
3,612
73
Detroit
I found a compromise that works well enough for me. Whether a password is required depends on how long I've been away and a password is always required when waking from sleep.

It's a bit obscure, and frankly I'm surprised Apple makes it this hard to find. In System Preferences, don't go under Desktop and Screen Saver (where one might expect to find this setting). Look for Security.

Under security, check "require password 1 hour after screen saver begins". This means that most of the time, when I walk away from my machine to do stuff, I have 90 minutes to get back without having to enter a password since my screen saver starts 30 minutes after inactivity.

For your situation, you could set it to 4 hours after screensaver begins. You would very rarely have to enter a password at home but you would always have to enter one when waking from sleep.

hope this helps.
 

Velocifero

macrumors newbie
Dec 9, 2008
26
0
Arlington, VA
I saw that but I was a bit confused about what that meant. If you're right then the problem is solved. Kind of a sloppy method for mac standards, but nonetheless a fix. Thanks.
 

Velocifero

macrumors newbie
Dec 9, 2008
26
0
Arlington, VA
Just noticed it applies to the sleep as well. So when you put it into sleep, it comes back on if you set it for 4 hours and open it less than that it seems. Back to the drawing board.
 

jon08

macrumors 68000
Nov 14, 2008
1,673
28
I find this new method that Apple introduced with Snow Leopard pretty stupid. In Leopard was much better, since you could set OS X to just ask you for password upon waking up from sleep!
 

r0k

macrumors 68040
Mar 3, 2008
3,612
73
Detroit
Just noticed it applies to the sleep as well. So when you put it into sleep, it comes back on if you set it for 4 hours and open it less than that it seems. Back to the drawing board.
Darn. I guess I was always waiting until after the time limit before waking from sleep and that's why it always asked me.
 

philtrapp

macrumors newbie
Feb 27, 2010
7
0
Help!!

Thanks!!! This works great!

-Steve
I can't undo it. It worked great and everything but i don't need it anymore. I pasted the undo code into terminal but it won't go away!:eek:

-------------------
Macbook Pro 13.3", Lenovo Thinkpad, Alienware Aurora,iPod Touch 16gb, iPod Shuffle (the small one) 4gb