Disable Require Password from Screen Saver Help

joemamasmac
New Contributor III

Good Morning,

I am building out my Yosemite Workflow, and one of the issues I see is the "Require password after Sleep or Screen Saver" is on by default. I have it in my first run script after imaging, to disable this using the following command.

defaults write com.apple.screensaver askForPassword -int 0

The problem I am having is this is re-enabled when a new user logs in. For labs, this isn't a problem as we have a config profile to manage this. For offices, if I set a config profile to manage this, the user can't enable it if they want to. I am sure I could piece this command out and have it set to run once per user, but I was hoping there was a way to make this permanent for new users. Thoughts?

Joe

4 REPLIES 4

alexjdale
Valued Contributor III

Why are you managing it if you are allowing office users to enable or disable it as they see fit? That is a very serious security requirement for us (to have it on).

davidacland
Honored Contributor II
Honored Contributor II

You could loop through the user template with the following script:

for USER_TEMPLATE in "/System/Library/User Template"/* do /usr/bin/defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.screensaver askForPassword -int 0 done

Hiller
New Contributor II

Did you ever resolve this? I have the same issue.

gregneagle
Valued Contributor

Seems a perfect task for a configuration profile with Set-Once. See https://github.com/timsutton/mcxToProfile