Sometimes you will need to permit normal users to run programs that are owned by other users (or root). Suppose, you have some important data under root’s ownership and you don’t want the users to read/modify them. But, users require them during their daily works. In such situation, you can make use of this program.
This program will call the shell script /root/scured/scripts/exec.sh which inturn will run under root’s ownership and should be able to access any files in the system. The users can access root owned files only through this program.
Along with userid (uid of the user who runs this program), this program will pass 9 commandline arguments to the shell script. If you want to pass more commandline arguemetns, you can add it. *
gcc setuid.c -o setuid-pgm *
chmod +s setuid-pgm *
mv setuid-pgm /usr/bin/
You can download the program from here.