1

I have installed MySQL and Apache httpd in Fedora 8 as root.

When I try to start MySQL and httpd as a non-root user, I get error messages stating that the user does not have permissions to start the services. I have checked the permissions of mysqld and httpd in /etc/init.d .. both of the files have rwxr-xr-x permissions.

When I add the line %groupname ALL=(ALL) ALL in /etc/sudoers, I am able to run the services using sudo.

How do I allow non-root users to install/uninstall/configure softwares and start/stop services ?

I have tried with

SUI=/usr/bin/sudo -i, /bin/su SOFTWARE=yum %groupname ALL=(ALL) SOFTWARE, !SUI

in /etc/sudoers

but with this I am not able to start MySQL installed by root. If I use sudo /etc/init.d/mysqld start I get the following message : User cannot become root on this machine.

  • Are you running SELinux? SELinux is very protective of MySQL. – Satanicpuppy Jul 1 '10 at 16:10
3

You don't really want to do that. If you're allowing someone to install/uninstall arbitrary software, there's going to be a way for them to get root if they're clever. So you might as well acknowledge it and either hand them root -- or if you're not willing for them to have root, then you don't want them installing/uninstalling software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy