Auto Logout of user after default 3 min.

zakitc
New Contributor

Have issue for client when they have been auto logout after Apple set default 3 minutes. Please note that I am saying User Logout but in fact the setting is "Start Screen Saver after". Option to change that is greyed out, there is no policy set for that specific setting (at the start of the issue). There are set settings in Computers - Configuration Profiles - Login items - Logon Banner  where two options are available: "Log out user after" and "Start Screen Saver after". 

When setting specific time for first option - it doesn't change anything  - users still are being logout after 3 minutes. If value is set to 0 or disabled  - the same result - 3min. defaults is still active. 

If setting for "Start screen saver" is set up to specific time  - that will change logout time to that specific time. But it will change back to 3 min. at random restarts. So you can restart once, it will stay 35 min., restart one more time  - it will suddenly go back to 3 min. This drives me (and client) mad. Tried to change all other settings - no result. 

Tried to set both  - Screensaver and Logout options to disabled - didn't change anything (users logout after 3 min.)

Raised issue with Jamf Support - they responded with below: 

For the better explanation of this PI, note there's the Screensaver (com.apple.screensaver) and there's ScreensaverUser (com.apple.screensaver.user):
https://developer.apple.com/documentation/devicemanagement/screensaveruser

Jamf only uses com.apple.screensaver with the "Start screen saver after:" option.

This setting configures the key "com.apple.screensaver" which only applies to the loginwindow. This does NOT configure screen savers for each user logged in.

Therefore, "com.apple.screensaver" should only be used to set up screen saver settings that apply when the machine is sitting at loginwindow while the "com.apple.screensaver.user" payload is for configuring screen saver for when a user is logged in.

With some scripts which didn't work. 

Does anyone have any idea or solution for this horrible 3 min. logout please? All devices are Sequoia 15.2-3

4 REPLIES 4

BGhilardi
New Contributor III

You need to create a login window configuration profile with the user logout option enabled or not.
Capture d’écran 2025-04-09 à 17.07.43.png

Thank you, but we already have this profile enabled and as I wrote above - it didn't change anything. Sorry, I explained it wrong - user logout is working as should. Issue is the Screen Saver option - which is set by Apple 3 min by default. So, it doesn't matter what setting is logout set up at, because screen saver will start earlier. And our clients hate that - they want at least 35 minutes. 

PaulHazelden
Valued Contributor

I set my User settings with a defaults command, run as a LaunchAgent at login by the User...

# ScreenSaver to 900 seconds 15 mins, set by profile as well
/usr/bin/defaults -currentHost write /Users/"$theuser"/Library/Preferences/com.apple.screensaver idleTime 900

# ---------------------------------------------------//------------------------------------------------------------
# Screen saver requires password
/usr/bin/defaults write /Users/"$theuser"/Library/Preferences/com.apple.screensaver askForPassword -int 1
# ---------------------------------------------------//------------------------------------------------------------
# Password required at 5 seconds
/usr/bin/defaults -currentHost write /Users/"$theuser"/Library/Preferences/com.apple.screensaver askForPasswordDelay -int 5

The variable $theuser is the current logging in user account name.

 

Thank you Paul - I will try it and get back to you. Much apreciated. It will be next week though.