Mac OS disable shutdown prevention when user is logged in

Solution 1:

There’s rarely a good technical question to a purely human problem. I heard one company change every account to the cell phone of people that don’t clean up so that everyone would call that number any time someone forgot to log out. Until the person paying the salaries resolves if it’s always IT’s responsibility to clean up after other people or set a standard for people to clean up after themselves, you’ll be stuck. A bit brutal, but it’s better than them losing their data by an unclean shut down.

The technical solution would be to trial the feature to log out idle connections and see if that works.

  • https://support.apple.com/guide/mac-help/set-your-mac-to-log-out-when-not-in-use-mchlp2443/mac

Barring that, you would enable a non-admin account to force power off / shut down but again, without them taking over the accounts that are logged in, you are left with the damaged app data or unsaved work dilemma. For that, an admin resetting the password would let someone take over the accounts to exit them cleanly, and then presumably lock that person out the next day since they wouldn’t know their password.

If you want to go down the path of a command you could enable a non-admin helper account, here are several options:

  • Way to logout a user from the command line in OS X 10.9

I prefer you take the tack of explaining the issue, why it’s disruptive when people leave before they clean up and then let the manager manage.