You are not logged in.
I've added my user to the power group using gpasswd, logged in and out multiple times. However I still need to su to root in order to init 6 or poweroff.
Am I missing something obvious?
Cheers!
Last edited by Noble (2010-06-04 23:08:24)
Those who give up their liberty for security,
neither deserve liberty nor freedom,
and they will lose both.
- Benjamin Franklin
Offline
As far as I know, the power group is only used indirectly by hal. Normal shutdown commands don't use it.
1000
Offline
Yes, IIRC that's the case. I have these three lines in my sudoers file to allow passwordless shutdown/reboots:
%power ALL= (ALL) NOPASSWD: /sbin/shutdown
%power ALL= (ALL) NOPASSWD: /sbin/reboot
%power ALL= (ALL) NOPASSWD: /sbin/halt
Offline
As far as I know, the power group is only used indirectly by hal. Normal shutdown commands don't use it.
That explains it since I'm not using HAL.
Those who give up their liberty for security,
neither deserve liberty nor freedom,
and they will lose both.
- Benjamin Franklin
Offline
you might just want to use your wheel group. I actually have my user set up for power options instead of a group because I like to keep permissions at the leaves rather than nodes and also because I am the only user of my computer.
inxs (ALL)=ALL NOPASSWD: /sbin/shutdown, /sbin/reboot
in sudoers
and I had read somewhere (way back when) that halt in turn uses /sbin/shutdown (or maybe it was the other way round) So i don't think we need to put both in.
I also have aliases in my .aliases file for the commands
alias on='sudo reboot'
alias off='sudo shutdown -h now'.
That way I dont have to type the entire command either.
Last edited by Inxsible (2010-06-04 15:45:56)
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Thanks for your input guys, solved
Those who give up their liberty for security,
neither deserve liberty nor freedom,
and they will lose both.
- Benjamin Franklin
Offline