1

I want to be able to run the pm-suspend and pacman without sudo to ask me for a password for all users in the group sudo.

I added the following line to my /etc/sudoers configuration following this QA:

%sudo ALL= NOPASSWD: /usr/bin/pm-suspend /usr/bin/gnome-session-quit

But it doesn't work.

What am I doing wrong?

  • Output of id please – Chris Davies Jun 04 '16 at 20:30
  • 1
    I've never used Arch Linux, but according to the documentation, pacman can be used to install packages directly from user-supplied files. Are you aware that you're essentially granting all users root permissions with this configuration? – Martin von Wittich Jun 05 '16 at 19:44

1 Answers1

3

You need to watch out for the following two points:

  • sudo gives the highest priority to the last matching configuration-line

  • you need to separate different commands by ','

so your configuration-line has to be

%sudo ALL= NOPASSWD: /usr/bin/pm-suspend, /usr/bin/gnome-session-quit