[CentOS] allowing users to issue the "shutdown" command

Alan Sparks asparks at doublesparks.net
Sat Oct 17 02:08:54 UTC 2009


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 ?
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>   

IIRC, shutdown.allow doesn't work that way.  It's a way to prevent
arbitrary people logged into a console from issuing a ctrl-alt-del
reboot sequence.
You'll either need to set up a 'sudo' capability for that account to run
shutdown, or do something like outlined here:
http://www.patoche.org/LTT/all/00000059.html

I'd prefer the sudo approach.
-Alan


More information about the CentOS mailing list