You are not logged in.

#1 2017-11-16 12:29:43

beppo
Member
Registered: 2017-08-01
Posts: 26

[SOLVED] pm-utils without sudo, solved before even finishing the post.

Hello,
I'm trying to execute the pm-utils commands without the need of using sudo.
What I have tried:
   - Adding:

bob  ALL = NOPASSWD: /usr/sbin/pm-hibernate
 bob  ALL = NOPASSWD: /usr/sbin/pm-suspend

    at the END of the /etc/suders file using visudo

  - Adding:
        ... ABORT POST ABORT - ABORT. I found my mistake.

At this exact point in time, as I was typing this, I searched for the next line that I used, which was:

 $users ALL = NOPASSWD: /usr/sbin/pm-suspend)

my eyes once again glanced on the forum post and stopped at:

"You can now run the scripts without a password by simply running:
$ sudo pm-hibernate "

*facepalm* I was trying to execute it without sudo.

I decided to still post this thread because I want to emphasise how important it is to read solutions thoroughly.
Greetings

Offline

#2 2017-11-16 12:53:28

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] pm-utils without sudo, solved before even finishing the post.

Thanks for retaining the post, we appreciate that.

Also, if you don't want to type sudo everytime, you can use shell aliases, like

alias pm-hibernate='sudo pm-hibernate'

Offline

Board footer

Powered by FluxBB