3

I'm writing a script to check for security compliance on a number of computers and wanted to verify that the user has set the computer to require a password immediately after sleep or screensaver. Basically I want to verify the status of this preference pane:

General Security Pane

I've found information here:

https://www.jamf.com/jamf-nation/discussions/9982/require-password-after-sleep-or-screen-saver-begins

And elsewhere that suggests the answer is to do this:

defaults -currentHost read com.apple.screensaver askForPassword

or

defaults read com.apple.screensaver askForPassword

but that setting doesn't appear to be set in High Sierra in either place and doesn't change when I change the length of time from Immediately to something else.

Any ideas where I might find this information in a command-line accessible manner? I kind of want the equivalent of FileVault's fdesetup status (or equivalent way to get that data) but for this setting.

  • Managed to figure out some of the ways to get at this, but came up against another obstacle, how to get the timeout. The password can be requested "immediately" or after some delay. I can't find where this is stored either, and I'd like to record it. – crackedegg Oct 12 '17 at 6:51

You must log in to answer this question.

Browse other questions tagged .