Make a shared office Mac log people out when they walk away
Quick answer
Open System Settings > Privacy & Security, click Advanced… at the bottom and turn on Log out automatically after inactivity. Then set how many minutes it waits.
Why it happens
On a shared Mac, the last person often leaves their account open, with email and files on show to whoever sits down next. Your Mac can log an account out by itself once nobody has touched it for a while. It's a Mac-wide setting, so an administrator has to turn it on.
How to fix it
Sign in with an administrator account. Open the Apple menu, choose System Settings and click Privacy & Security.
Scroll right down and click the Advanced… button. Turn on Log out automatically after inactivity.
Privacy & Security›Advanced…›Log out automatically after inactivity
Set the number of minutes next to it. Somewhere between 15 and 30 suits most offices. Type an administrator password if your Mac asks, then close the panel.
Tell everyone who uses the Mac to save their work as they go. An app with unsaved changes can hold up the log out.
Still not fixed?
Want the screen protected sooner? In Lock Screen, set Require password after screen saver begins or display is turned off to Immediately. The account stays open but nobody can use it without the password.
Lock Screen›Require password after screen saver begins or display is turned off
Show people the quick lock: Control-Command-Q locks the screen straight away when they get up.
Make sure the Mac doesn't open an account by itself after a restart. In Users & Groups, set Automatically log in as to Off.
Users & Groups›Automatically log in as
If the setting is greyed out or keeps switching back, a company profile may manage this Mac. Check General > Device Management and talk to your IT team.
General›Device Management
If the Mac never logs out even with every app closed, test it with a short time like 5 minutes. If it still stays logged in, contact Apple Support.
Questions people ask
Can a Mac log out automatically after inactivity?
Yes. Turn on Log out automatically after inactivity in Privacy & Security, under Advanced…, and choose the number of minutes.
Why doesn't my Mac log out automatically when it should?
An app with unsaved work can hold up the log out. Ask people to save and close their apps, and check the setting is still on.
What's the quickest way to lock a Mac when I walk away?
Press Control-Command-Q. The screen locks at once and needs your password to get back in.
Related fixes
Glad it worked.
Sorry it didn't. Tell us what happened and we'll fix this page.
Get there in one click with PinSet.
Press ⌃ ⌥ Space and type “log out automatically after inactivity”. PinSet opens Privacy & Security › Advanced… in System Settings and rings Log out automatically after inactivity. One of 2,400+ checked Mac fixes. Works offline.
7 fixes free · Works offline · macOS 26 and 27