Logging users out after a certain time

grecopj
Contributor

Hi All,
I have a configuration profile to manage the Login Window Preferences. Seems to be working fine but I can not get it to log out a user after a certain amount of time. I have the check box checked to Log out users after 60 minutes of Inactivity but that's not working.
Users are logging in via AD. Also does not work with local Admin account.
JSS 9.32, Mavericks 10.9.4

Am I missing something or is this not possible with AD users?

Thanks

10 REPLIES 10

Matt
Valued Contributor

Are there any background processes that may be stopping the log out process?

grecopj
Contributor

Would the Recurring Check in Frequency be a factor? For now I have it set at Every 5 minutes. No other background processes that I know of.

Matt
Valued Contributor

I'm not sure, maybe some others can answer this question I am curious how this works as well. I know that logging people out can be stopped by the most ridiculous background processes so maybe this is the same thing.

mm2270
Legendary Contributor III

Actually, background processes should not come into play here. If they did, no Mac would ever go to sleep or have its screensaver kick in. There are always some kind of background processes going on on a Mac at any given time, even when sitting idle.
Idle time should be calculated by watching external input, such as keyboard and mouse presses. I believe this is the same thing that drives your screensaver to kick in after its set idle time among other things.

One thing you can do to make sure there isn't something actually continuously resetting the Mac's idle time is to SSH into one of the Macs where this isn't working and run the following command, while making sure no-one is using it of course. This should print the number of seconds the Mac has been idle according to the hardware/OS. If you see that staying at 0 or 1 and not going up each time you run it, then something is going on to keep the Mac awake. If it rises each time then its something else that's wrong I'd guess. Watch to see if anything happens at the mark where the system should be auto logging out.

expr $(ioreg -c IOHIDSystem | awk '/HIDIdleTime/{ rec=$NF } END{ print rec }') / 1000000000

hodgesji
Contributor

Did you ever get this figured out? I'm trying to implement an auto logout in our labs and ran into the same issue where it wouldn't apply from the built-in configuration. I tried running the script that pulls the idle time and my count is continuing to rise even after I know I am providing input that should reset the idle time. Even worse, I can manually turn on Apple's auto logout feature in Sys Prefs > Security > Advanced, set it for 5 minutes and it still doesn't work.

Next I'm going to try a vanilla install of Yosemite.

Aziz
Valued Contributor

@hodgesji Did you ever find a solution?

I'm having issues where students do not log out and other students would like to use the computer. The built in setting using a config profile does not work.

I'm currently trying this:

sudo defaults write /Library/Preferences/.GlobalPreferences "com.apple.autologout.AutoLogOutDelay" -int 1200

Aziz
Valued Contributor

The above doesn't work.

It reflects in System Preferences, but never logs the person out.

apizz
Valued Contributor

@Abdiaziz, I have not confirmed that this actually works in our environment (I've set all our lab machines to auto logout after 1 hour) but given your comments I'm going to test this myself!

hodgesji
Contributor

I never found a solution to this. The configuration profile hasn't worked in my tests with 10.10, hoping to see if something changes when 10.11 comes out.

I also attempted changing the .Global Preferences and saw the same thing you saw: it appears to have applied in Sys Prefs but doesn't actually do anything when the set time comes up.

dcisewsk
New Contributor

I'm having issues where students do not log out and other students would like to use the computer & the only way to log back in is to do a hard restart on the computer. Is there any settings that I can change to make it easier to log one out and log back in.