1

I had to shut down a bunch of Linux boxes tonight because we have an upcoming power outage for the whole building. I did not know any passwords for most of the boxes.

So, (on the Ubuntu desktop) I click the power button in the upper right and select "Shutdown". Nothing happens. Try again. Nothing happens.

Okay, then I proceeded to pull the plug on every machine.

Does Linux have some kind of "attitude" that you have to log in to shut down the machine, because a physical user can ALWAYS terminate the machine by unplugging the machine, so the idea of forcing somebody to login to shut the machine down seems kind of nuts to me. Windows machines can always be turned off from the login screen for this exact reason.

Is there anything I could have done differently to have shut down the machines in a controlled fashion not having the passwords?

(I am hoping when I come in to work tomorrow there isn't an ugly email from somebody complaining about lost work or non-functional boxes.)

1
  • wasnt there anyone available knowing what processes were running, if they are sensitive or may have a big impact to be cold-shutdown? if you are not reponsible for it, ask for advice always. boxes not logging in are the least of your problems if data gets lost or databases get damaged. Aug 22, 2013 at 23:13

1 Answer 1

1

You should be able to shut down from the log in screen, although it may depend on whether someone else is logged in. However, it seems to be a known issue, in some versions of Ubuntu, that this doesn't work under some circunstances. See an Ubuntu question about it and the bug report it links to.

Regarding alternatives, you could try pressing Ctrl + Alt + Del or press the power button. Depending on configuration and working ACPI, that may work.

If all else fails, you can at least try to kill all processes cleanly and sync the disk before shutting down, by holding down AltGr + SysRq and pressing the following keys in sequence, pausing for a few seconds between them: R (take control of keyboard back from X), E (send SIGTERM to all processes, allowing them to terminate gracefully), I (send SIGKILL to all processes, forcing them to terminate immediately), S (flush data to disk), U (remount all filesystems read-only) and O (shut down).

Read more about this in the Magic SysRq key article in Wikipedia.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .