Root sudo? (was Re: Cron Job Failure)
Mike Burger
mburger at bubbanfriends.org
Wed Apr 27 11:32:49 UTC 2005
On Tue, 26 Apr 2005, Mike Burger wrote:
>>> Realizing, up front, that this doesn't answer your question, I do have
>>> ask...why would you bother using sudo as root? The whole point of sudo is
>>> to be able to run commands as root...if you're already root, why would you
>>> need to use sudo?
>>>
>>>
>> I'm not using sudo with root. The problem is that the php script forks a
>> process using sudo.
>> Such as the php script:
>> <?
>>
>>> exec("sudo /usr/local/bin/setpassword $uid $pass");
>>
>> ?>
>>
>> Thanks any way.
>
> Seems to me, then, that you should have "apache" as the user in the sudoers
> file, now root...httpd, and by extension, PHP, run as user apache.
Bleah...that should have read "not root...". Sorry.
--
Mike Burger
http://www.bubbanfriends.org
Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org
To be notified of updates to the web site, visit
http://www.bubbanfriends.org/mailman/listinfo/site-update, or send a
message to:
site-update-request at bubbanfriends.org
with a message of:
subscribe
More information about the redhat-list
mailing list