What rights / roles required to mount and shutdown

1

I have a debian with a MATE desktop.

Since my last update I can't shutdown the computer from the gui anymore (I need to open a shell, become root and issue shutdown then)

Same goes for mounting external devices.

If I login into the GUI as root I can shutdown from it, so I assume its a privileges issue. Thus my question:

  • What privileges do I need to be able to shutdown / mount as a user?

And preferably:

  • Where can I look this up for the next time?
  • Is there a graphical tool that lets me select high-level privileges for users that just assigns stuff right, without me having to know what exactly needed to be done?

Groups:

myUserName cdrom floppy admin audio dip video plugdev netdev lpadmin scanner bluetooth

uname -a:

Linux mortal 4.8.0-1-amd64 #1 SMP Debian 4.8.5-1 (2016-10-28) x86_64 GNU/Linux

Mate-about:

MATE Desktop Environment 1.16.1

I tried:

  1. Installing users-admin in hope that I could select the privileges there, but I can only assign groups there and don't know which ones I need.
  2. Reading this tutorial and adding my user name to /etc/shutdown.allow. /etc/inittab had the line ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now already. Pressing CTRL-ALT-DEL does not shut down the computer, though. It opens the 'select shutdown option' window.

I can select System -> Shutdown from the Menu, but when I select 'Shutdown' there, I'm just logged off.

After searching I found this error in ~/.xsession-errors:

*** ERROR ***
TI:14:12:46     TH:0x556fad03bb90       FI:gpm-manager.c        FN:gpm_manager_systemd_inhibit,1784
 - Error in dbus - GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied
Traceback:
    mate-power-manager(+0x1904f) [0x556fabb0704f]
    mate-power-manager(+0x118be) [0x556fabaff8be]
    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_type_create_instance+0x20b) [0x7f0045b1534b]
    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(+0x151fb) [0x7f0045af71fb]
    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_object_newv+0x1dd) [0x7f0045af8c0d]
    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_object_new+0x104) [0x7f0045af93c4]
    mate-power-manager(+0x12142) [0x556fabb00142]
    mate-power-manager(+0x7c92) [0x556fabaf5c92]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f0044f2f2b1]
    mate-power-manager(+0x800a) [0x556fabaf600a]

Digging deeper I found that I'm not allowed to perform a shutdown because I have no user agent running:

$ pkcheck --action-id org.freedesktop.login1.power-off --process $$ --allow-user-interaction
polkit\56retains_authorization_after_challenge=1
Authorization requires authentication but no agent is available.

Angelo Fuchs

Posted 2016-11-29T12:18:53.933

Reputation: 502

howto: http://winaero.com/blog/how-to-enable-shutdown-and-reboot-for-a-normal-user-in-debian-jessie/ (1st google hit)

– Ipor Sircer – 2016-11-29T12:21:58.170

@IporSircer That file does suggest that I should be presented an error message, but I'm not. I'll look into it and if I can fix it with this, I'll add a proper answer. Thank you. – Angelo Fuchs – 2016-11-29T12:31:22.603

No answers