Running processes as root

Conor P. Cahill cpcahil at virtech.UUCP
Sat Oct 21 07:37:41 AEST 1989


In article <1989Oct19.182027.11171 at newcastle.ac.uk>, aidan%ncl.shire at newcastle.ac.uk (Aidan Saunders) writes:
> The program prog1 is a shell script owned by root in group staff and of 
> mode 4750
> ie: 
> 	-rwsr-x---  root    staff    prog1 

Your problem is that under system V shells do not gain setuid privileges.
If you relly want this to work you need to creat a small c program like 
the following:

	main() { execl("/bin/sh","sh","/etc/program",(char *) 0); exit(0); }

	first, move prog1 to /etc/program
	compile the program above, chmod 4755 it, and place it whereever
	prog1 was




-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+



More information about the Comp.unix.questions mailing list