Disable Mac OS X server's administrator shutdown prompt?

3

1

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.

adib

Posted 2015-05-02T07:21:29.543

Reputation: 245

FWIW this hasn't been caused solely by the installation of Server.app alone, as I do not have this problem with very few services running. Try disabling services individually to see if it's a service that's causing this. – grg – 2015-05-02T22:42:46.613

@grgarside It still displays that dialog even when all services (in the Server app) is turned off. Nevertheless, the question is about disabling that dialog so that anybody logged in locally can shut it down safely (and not resorting to the power button). – adib – 2015-05-03T02:09:06.020

When you say "I try to shut down as a local interactive user" , I assume you mean via the graphical user interface, and not via the command line? If so, does the dialog disappear if you modify your user (the one you're logged in as) to be an administrative user? (I assume you're not ("logs in to a non-privileged account" ... and perhaps don't want this, "to make it convenient...") The other option is to go down to the command line (open Terminal); e.g., see http://apple.stackexchange.com/questions/103571/using-the-terminal-command-to-shutdown-restart-and-sleep-my-mac

– michael – 2015-05-03T09:03:44.837

@michael_n Yes it's the graphical interface attached to the local display. Yes I see this dialog even when shutting down as an administrative user. No, I haven't implemented it on the iMac and testing it on a spare laptop. No, using the Terminal is not part of the question and really not an option since the goal is to have regular users able to shut it down graphically (needing to use sudoto shutdown is even worse). – adib – 2015-05-03T09:32:20.893

@adib one step at a time :-) once you have an script (a set of steps) that accomplishes what you want to do, you can execute it without a terminal. You can run osascript without using a terminal; see http://superuser.com/questions/360247/run-a-shell-script-on-os-x-without-having-a-terminal-window-appear

– michael – 2015-05-04T01:18:58.557

Answers

1

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.

taotao

Posted 2015-05-02T07:21:29.543

Reputation: 11

Unclear but how does Xcode factor into this? – JakeGould – 2015-09-07T05:37:11.833

@JakeGould bacause after you setup Xcode with OS X Server, the server is running Xcode in the background like a bot to do jobs like continuous integration as a service provided to computers in your network. It seems the server is running that Xcode service under another username even when there is no real work to be done by Xcode, and that's why we get that prompt when we try to reboot or shutdown computer. – taotao – 2016-03-04T01:25:28.467