On 2015-05-22 05:24, Alex Kost wrote:
Daniel Pimentel (2015-05-22 03:13 +0300) wrote:
Hi Guix, I'd like to add halt permission to normal user in XFCE
session. The halt binary is in system profile:
/run/current-system/profile/sbin/halt
How to add halt binary to my normal user?
As for me, I put the following into "/etc/sudoers" (but not directly –
there is ‘sudoers’ field in ‘operating-system’ declaration):
--8<---------------cut here---------------start------------->8---
Cmnd_Alias HALT = /run/current-system/profile/sbin/reboot, \
/run/current-system/profile/sbin/halt
<my-name> <my-host>=NOPASSWD: HALT
--8<---------------cut here---------------end--------------->8---
Also I have the following shell aliases (in my ~/.bashrc):
--8<---------------cut here---------------start------------->8---
alias reboot='sudo reboot'
alias halt='sudo halt'
--8<---------------cut here---------------end--------------->8---
After that I can use "halt" and "reboot" as a user (without promting
for
a password). I hope it helps.
It's work.
I used it, but I would like to add halt and reboot permission to XFCE.
Thanks.
--
Daniel Pimentel (d4n1)
GnuPG (0B1A1914)
FSF (13054)