The suid tag has no wiki summary.
3
votes
1answer
593 views
How can I use SetUID on a shell script to run as a non-root user?
Our company's server is running Ubuntu 12.04 (Precise) and Apache 2. We have a custom, internal web application installed. I have a bash script which pulls any updates to that app from source control ...
1
vote
1answer
112 views
smbd won't start or stop when user is elevated to root by SUID bit
Under Ubuntu 12.04, I've written the following C program to help me shut down my server's apache2 and samba services while I run automated backups. Notice that in the Makefile I'm setting the SUID bit ...
0
votes
1answer
179 views
How to SUID? Shellscript, Perlscript, Binary-Wrapper?
I just read some articales about suid.
lets say i need the helpdesk to be able to change customer passwords.
it would be good if i could execute a ruby script that checks the db if the user is a ...
3
votes
3answers
128 views
Problems with SUID
I have a simple command that I want to be able to perform as a user, but it requires root permissions. I suspect that this is a case for the "SUID"-bit, but I've never used it.
This is what I've ...
0
votes
3answers
134 views
unable to properly execute binaries from PHP
I was building an app on a SUSE box, and had a binary called create_group for instance, which had a suid bit and allowed my PHP app to call exec('create_group grpname'); and create a new group (there ...
0
votes
1answer
184 views
PHP Security: Need help understanding SUID
I am reading a book about PHP Security and there's the below I do not really understand, specific part in bold. So say PHP want to move a file that belongs to user A, PHP has to run as user A? Is that ...
1
vote
4answers
502 views
find / -perm -4000 -o -perm -2000 > suid.. help with bash script to run nightly.?
help me with this this problem. so far i have "find / -perm -4000 -o -perm -2000 | xargs ls -l > suild.list" argument that i want to write as a bash script.
I would like to write this as a bash ...
1
vote
1answer
699 views
Running a shell script with its owner's privileges
On a Debian (5.0.3) server I have a user svnsync who owns a certain shell script:
-rwsrwsr-x 1 svnsync users 119 Dec 21 13:45 mirror-svn.sh
I'd like everyone in the users group to be able to ...
0
votes
5answers
1k views
Setuid not working on Solaris
I have a Perl script marked setuid, but when I run it, it says I don't have permission to do so. I am running Solaris 10. This works on another system but I can't tell whats different. What am I ...
10
votes
6answers
20k views
Run a shell script as a different user
What's a good way of running a shell script as a different user. I'm using Debian etch, and I know which user I want to impersonate.
If I was doing it manually, I would do:
su postgres
...
7
votes
3answers
4k views
Cannot Set UID on Shell Scripts
Can anyone help me find out what is going on here? I have some rules set up tracking packet counts. When I run the following script as root:
#!/bin/bash
iptables -t mangle -xnvL
I get the output ...