Disable warning: "There is a user sharing this computer." I have a Mac used as a test server and it restarts daily automatically. Occasionally we connect to it to grab files, but if we forget to disconnect, the Mac fails to restart because it waits for confirmation for this dialog:



"There is a user sharing this computer. If you restart they will be disconnected."

Is there a way to disable this confirmation and make sure the Mac always restarts regardless of who is connected?
You could use launchd to execute /sbin/shutdown -r now as root at the time you want to restart.

I'm not able to expand this into step-by-step directions right now, but this might be helpful and if you don't get a more thorough answer first, I can come back and expand this hint in a fuller set of directions later this week.