0
votes
4answers
838 views

The opposite of su: run a command without root privileges

I'm writing a shell script where most commands don't require root privileges. The script should be ran by the administrator. But I would like to be able to "su" to a normal user account for the parts ...
1
vote
1answer
192 views

Allow normal user to run PHP script as root using SUDO

How can I allow a normal user on Ubuntu to run php scripts? sudo php /path/to/script/script.php Basically the script needs to be run as root but the users does not have root privileges on their ...
2
votes
2answers
221 views

How to execute (some) CGI commands as root

I want to put a simple CGI script in my APACHE server. I'd like to write it possibly in C (but also in PERL, if I want). The problem is that it must contain some lines that can be executed only by ...
6
votes
2answers
19k views

Debian: how to create a user with root privileges (sudo)

How do I create a user with root privileges in Debian? Maybe it sounds a bit silly, but I don't think I need user directories, only some rights to run services (mainly web server, mysql, etc.). I just ...
0
votes
2answers
1k views

tomcat6 on ubuntu fails when user set to root

I'm well aware that running tomcat6 is really bad from a security point of view - and opens the box it is running on to all kinds of security risks and attack vectors. That said: When I change the ...
6
votes
2answers
3k views

What is the difference between `su` and `su -` in CentOS?

I tried to switch to root in CentOS by running su, but it does change to root, but it doesn't seem to be a real root user. For example, by default, ifconfig command in /sbin is not found in the path ...
2
votes
2answers
1k views

CPanel - How to stop Apache from running as root user?

<?php echo `whoami`; ?> So this is returning 'root' and I don't know how to prevent it. I'm using WebHost Manager / CPanel which is supposed to create multiple users/vhosts and have Apache ...