Mac OS disable shutdown prevention when user is logged in At our office, there are tons of different users who use the same Macs running High Sierra over the course of a day. Unfortunately, sometimes people forget to log out after they've used those computers which leads to the last people in office in the evening not being able to shut those computers down without the admin password. I cannot give our Admin credentials to all of them because that would pose a huge security risk. Is there a way to modify Mac OS so that it doesn't ask for the Admin credentials when trying to shut the machine down while another user is logged in?
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.