-4
votes
1answer
34 views

User with “root” privileges can't actually see all folders [closed]

There is this problem with my newly created user with "root" privilages in my web server Ubuntu LTS 12.04 . I follow the rule: adduser newuser usermod -a -G sudo newuser then I add in visudo # ...
0
votes
4answers
589 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 ...
0
votes
1answer
302 views

Prevent setuid from dropping setcap user privileges (VirtualBox)

I'm trying to run a web server from a headless, NAT'd VirtualBox guest. VirtualBox needs to bind to port 80, but the only way to do so is by running VirtualBox as root. To get around this, I tried ...
1
vote
2answers
772 views

Why can't I change the mode of /proc/sys/kernel/pty/max even when I am root?

Since pty is limited, I want to modify the content of /proc/sys/kernel/pty/max. The original value in max is 4096, and now I want to modify it to 10000. [root@home pty]# pwd /proc/sys/kernel/pty ...
5
votes
1answer
224 views

Ports below 1024

DISCLAIMER: I know how to run daemons that either listen on ports <1024 by using privbind or some iptables REDIRECT. Or more generally spoken, how to make daemons available on priviliged ports that ...
0
votes
2answers
571 views

Allow user act as root, so he does not need to use sudo each time?

I wish for a user to have root privileges, but editing the /etc/sudoers file to allow no password still requires me to use the sudo command before a program I wish to run with elevated privileges . I ...
0
votes
1answer
639 views

Deleting a file created with a SELECT … INTO OUTFILE

I am trying to delete a file created with a SELECT ... INTO OUTFILE statement into the /tmp directory The file belongs to the mysql user (who doesn't have a login shell). I have administrative ...
14
votes
4answers
10k views

Bash Scripting: Require script to be run as root (or with sudo)

I'm trying to write a bash script (in Ubuntu) that will backup a directory using tar. How can I do a check in the script so that it can only be run as root (or with sudo)? For instance, if a user ...