Useful macOS defaults: Screen Saver
com.apple.screensaver controls screen saver behaviour, including the password requirement that locks your Mac.
Require a password after the screen saver starts
Ask for a password the moment the screen saver or display sleep kicks in:
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
The delay is in seconds. Setting it to 0 means the password is needed straight away. Setting it to 300 gives you a five-minute grace period.
To set a 5-second delay:
defaults write com.apple.screensaver askForPasswordDelay -int 5
Turn off the password requirement
defaults write com.apple.screensaver askForPassword -int 0
This means anyone can wake your Mac and use it without a password. Only do this if your Mac is in a safe place.
Notes
On modern macOS, these settings are also available in System Settings, then Lock Screen. The defaults commands are useful for scripting or setting up several Macs at once.
Changes take effect the next time the screen saver activates. You do not need to restart anything.
Enjoyed this post?
Well, you could share the post with others, follow me with RSS Feeds and/or send me a comment via email.
Tags
Category:
Tags:
Year: