0

I added new launcher to panel using this command for shutdown: gksu telinit 0

When I wanted to get rid of constant inserting of password, I did not succeed. I opened visudo and added line "username" ALL = NOPASSWD: sbin/telinit 0

...but it doesn't work

I succeded with hibernate launcher in similar way - with adding line in visudo: "username" ALL = NOPASSWD: etc/acpi/hibernate.sh

What am I doing wrong with shutdown line in visudo?

1 Answer 1

0

You should be able to use poweroff to turn off a system.

Run this command:

sudo visudo

Add this line near the bottom (before the #includedir line), or edit an existing line:

USERNAME ALL=NOPASSWD: /sbin/poweroff

(replace USERNAME with your username)

Press Ctrl+X, Y, Enter.

Change your launcher to use the sudo /sbin/poweroff command.

To additionally make this work for reboot, add /sbin/reboot to the NOPASSWD: line above.

2
  • Thank you...that worked...what would be command for restart?
    – Mersault
    Feb 1, 2014 at 22:12
  • @mo That would be reboot. I'll edit my answer.
    – kiri
    Feb 1, 2014 at 22:49

You must log in to answer this question.

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