0

I want to configure PAM to enable non-root normal users to be able to shutdown. how to do that?

I'm using Ubuntu server 12.04


I know how to do that with many ways such as changing permissions of the binary or adding exceptions in the sudeors....

I don't want to change permissions

I don't know to configure policykit

I don't want to give permissions from sudeors

I need only to learn how to do it by confiuring PAM not any onther method

  • A desktop or server? The desktops mostly have DBUS/policykit interfaces that allow users to shut down... [These can be accessed from the command line in a stretch](http://askubuntu.com/q/15428/449). – Oli Mar 18 '14 at 12:06
  • @Oli I edit my question. I'm using server –  Mar 18 '14 at 12:10

1 Answers1

0

policykit also work on server, I'd suggest to modify (as root) the following file:

/usr/share/polkit-1/actions/org.freedesktop.login1.policy

Look at actions like this one:

action id="org.freedesktop.login1.power-off"

And replace allow_any, allow_inactive, and allow_active values by yes to allow non root users to perform a power off without any authentication.

Sylvain Pineau
  • 61,564
  • 18
  • 149
  • 183