Can't set Auto-logout settings

emax
New Contributor III

I’m setting the Auto-logout behavior to not log out the user after a set period. This is usually found in System Preferences -> Security & Privacy -> Advanced; we’re setting it via a script. For most of our users, the script passes the parameter 3600 (60 minutes); for devs, like this user, we set it 0. Here’s the script:

#!/bin/sh
# this script controls the auto logout delay
# AutoLogOutDelay=0 is disabled, all other values enable
# logoutvalue is number of seconds until user is logged out
# parameters
logoutDelay=$4
defaults write /Library/Preferences/.GlobalPreferences com.apple.autologout.AutoLogOutDelay  -int $logoutDelay
defaults write /Library/Preferences/.GlobalPreferences com.apple.securitypref.logoutvalue -int $logoutDelay

We can use defaults read… to verify that JAMF is successfully setting his machine’s values to 0. Yet when we look at the state of the System Prefs pane, it shows 30 minutes! After viewing the GUI, defaults read… reveals that the values have been reset to 1800.

I’m stumped as to why/how it keeps getting reset and where the 1800 value is coming from.

5 REPLIES 5

stevewood
Honored Contributor II
Honored Contributor II

@emax check any configuration profiles you have that are touching the login window and make sure the Log Out Users After: X minute of inactivity is unchecked.

emax
New Contributor III

@stevewood Yeah, that was the first thing I looked at. We're using a profile with a custom payload exported login window policy, had the screensaver section removed to avoid jamf "askForPassword" bug.

What's really odd is the 1800 second (30 mins.) setting. Not sure where that's coming from.

bentoms
Release Candidate Programs Tester

@emax Pushing down FV2 key redirection & running 9.93?

emax
New Contributor III

@bentoms: Yes, we're doing FV2 key redirection, but we're already on 9.96.

Is this tied to it?

bentoms
Release Candidate Programs Tester

@emax might be. It was an issue in 9.93, might be worth recreating the profile now you're on 9.96