MacOS – Disable Mac OS X server’s administrator shutdown prompt

macmacosshutdownxcode

I’ve just installed Mac OS X Server (version: 4.1 (14S1092) on Mac OS X: 10.10.3 (14D136)). Whenever I try to shut it down (as a local interactive user), I keep seeing a prompt that requires me to enter an admin’s name and password before proceeding with the shutdown:

Shutting down may cause other users logged into this computer to lose unsaved changes.

OS X Server shutdown prompt

I keep seeing this dialog even though there is nobody else connected to the machine.

Question is, how can I disable this dialog? I mean, let anybody who is logged in locally (as in using the monitor and keyboard attached physically to the system) to shutdown the machine without entering an administrator password (or even without entering their own password?) I see this is not a security issue since with physical access, they can just press the power button.

My user has full administrative rights, so theoretically I can just enter my username and password there, but this is not the core of the problem.

Best Answer

I experienced exactly the same problem and successfully solved it recently.

Yes, this is caused by server.app. To be exact, it is due to you linked you Xcode in your server.app

To see how Xcode is linked to your server.app: open server.app, in left sidebar, under "services", find "Xcode". (Sorry but I don't have privilege to post pics here)

In this way, your server is running Xcode in the background, and hence the prompt when you attempt to shut you computer. Using command line interface to shut would not change the situation.

Interestingly, once you "Choose Xcode to begin" here, there is no option to disconnect Xcode here. Switching off in the upper right corner would not help, even uninstalling server.app thoroughly would not help either.

Fortunately, the solution is as easy as two commands:

sudo xcrun xcscontrol --shutdown
sudo xcrun xcscontrol --reset

Here is how I found this: I looked through the Activity Monitor for processes with suspicious usernames, and noticed a user named "_xcscouch". By search "xcscouch mac", I found the following answer and it solved my problem. I Installed Server.app on Yosemite to enable caching, but see many server processes in Task Manager (_xcsbuild and _devicemgr and _calendar processes)

I had the same problem on both my macbook air and my mac mini, and I solved them both. I can reproduce the problem and confidently solve it immediately.

Related Question