Re: allowing users to issue the "shutdown" command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 17-Oct-2009 Robert wrote:
> 
> 
> Buz Davis wrote:
>> I am running CentOS 5.3 and have just the two accounts "root" and 
>> "buz".  I would like to be able to issue "shutdown" from the account 
>> "buz", and thus created
>> /etc/shutdown.allow with the single entry  "buz" (without any quotes).  
>> I still
>> get the error message "only root can do this" (or something similar) 
>> even if I include the '-a' option on the shutdown command.  What am I 
>> missing ?
>>   
> I'm not going to verify this right now but I believe "buz" can execute 
> the command "poweroff" to shutdown -h now
> and "reboot" to shutdown -r now.
> 
>         [rj@mavis rj]$ ls -l `which poweroff`
>         lrwxrwxrwx 1 root root 13 Apr 2 2009 /usr/bin/poweroff ->
>         consolehelper
>         [rj@mavis rj]$ ls -l `which reboot`
>         lrwxrwxrwx 1 root root 13 Apr 2 2009 /usr/bin/reboot ->
>         consolehelper
>         [rj@mavis rj]$

>From the man page:

       If  halt or reboot is called when the system is not in runlevel 0 or 6,
       in other words when it's running normally,  shutdown  will  be  invoked
       instead  (with  the  -h  or -r flag). For more info see the shutdown(8)
       manpage.

-Philip

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux