Change Auto logout via command line.

Joined
Dec 11, 2013
Messages
2
Reaction score
0
Points
1
I am looking to remotely change the auto logout time (Systems>security>advanced) on a bunch of lab machines by sending a command through ARD.

Knowing the actual file that needs manipulating may be enough.
 
Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,236
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
The file is a hidden file in the root Library:
/Library/Preferences/.GlobalPreferences.plist

The key is:
Code:
	<key>com.apple.securitypref.logoutvalue</key>
	<integer>3600</integer>

I just stumbled into something new. When I copied that string in the plist and tried to paste it here, I got a lot of information besides what I saw in the plist, including what should be the correct Terminal command:

sudo defaults write /Library/Preferences/.GlobalPreferences com.apple.securitypref.logoutvalue -int 3600


Where "3600" is the number of seconds for a 60 minute inactivity period.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top