[CentOS] Having problems with sudoers

Philippe Naudin philippe.naudin at supagro.inra.fr
Wed Jan 25 15:45:28 UTC 2012


Le mer 25 jan 2012 08:09:50 CET, Steve Campbell a écrit:

> ... 
> I'm trying to enable the user "apache" to have the ability to run an 
> executable from a web page. One of the common solutions is to do the 
> following:
> 
> Defaults:apache  !requiretty
> apache    ALL = NOPASSWD:/program.name
> 
> also tried:
> 
> Defaults    !requiretty
> Defaults    visiblepw
> 
> Anyone have a suggestion? I've got to research the tty stuff for now to 
> ensure there is one available, but beyond that, I'm stumped.

Have you checked (grep sudo /var/log/secure) that the user and the
command are exactly what you have in /etc/sudoers ? And how is your
SELinux ?

This works for me in /etc/sudoers :
Defaults    requiretty
User_Alias TARTUFFE=naudin
Defaults:TARTUFFE !requiretty


-- 
Philippe Naudin



More information about the CentOS mailing list