[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Xfce halt permission
From: |
Alex Kost |
Subject: |
Re: Xfce halt permission |
Date: |
Fri, 22 May 2015 11:24:16 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
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.
--
Alex