I installed the SLiM login manager on Debian Wheezy and disabled the root account's ability to login, as described in this Debian Wiki article, so sudo <command> must be used to run anything as root.

When I try to shutdown the system from SLiM, by following the instructions in the SLiM manual, i.e. typing "halt" as the username, then a password, SLiM does not shutdown. /var/logs/slim.logs reports this error:

slim: pam_authentication(): Authentication failure
  • This problem does not appear when Debian is configured to allow root to login.

How can I shutdown the computer from SLiM when root login is disabled?

  • Is halt command available in system ?
    – SHW
    Jan 24, 2014 at 5:45
  • According to the config file, when "halt" is typed into SLiM, it should call "/sbin/shutdown -h now".
    – Village
    Jan 24, 2014 at 10:25
  • Note, the system is setup to not allow root to login using su, but to allow sudo. Could this be interfering with SLiM trying to shutdown the computer?
    – Village
    Jan 24, 2014 at 10:36
  • most likely disabling root-login is the problem here. slim needs a way to verify that you typed the correct root password.
    – umläute
    Jan 28, 2014 at 9:39
  • There is a logfile /var/log/slim.log what does it say in there ?
    – X Tian
    Jan 30, 2014 at 12:08

2 Answers 2


unsecure, but works

# chmod u+s /sbin/shutdown

$ shutdown -h now

You may want to tell SLiM to call sudo shutdown -h now and sudo to not ask password for that command ( your_user ALL=(ALL) ALL, NOPASSWD: /sbin/shutdown in your /etc/sudoers).

You can also switch tty by typing CTRL + ALT + Fx (where x is the tty you want to switch to), login in and shutdown the computer.

  • 1
    urgh, why would you want to allow everybody to shutdown the system? the default in slim is to only allow people who know the root-password to do that!
    – umläute
    Jan 28, 2014 at 9:37
  • I cannot figure out the meaning of your answer. Have you noticed that the user has denied users to log in as root? He relies on sudo to get/give programs higher privileges when needed, e.g. to shutdown the system. Also only allowed users can use sudo.
    – edmz
    Jan 28, 2014 at 17:49
  • i was missing the you_user part in your answer and assumed you were granting * (all users) the permission to shutdown without password.
    – umläute
    Jan 29, 2014 at 9:05
  • nevertheless this doesn't solve the problem: the OP wants to allow the login-manager to shutdown (within the login screen), rather than login as a given user and then shutdown (which is a completely different task)
    – umläute
    Jan 29, 2014 at 9:07
  • I don't think it's possible then.
    – edmz
    Jan 29, 2014 at 14:41

You must log in to answer this question.

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