Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwm.edu!lll-winken!uunet!virtech!cpcahil From: cpcahil@virtech.UUCP (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: Running processes as root Message-ID: <1296@virtech.UUCP> Date: 20 Oct 89 21:37:41 GMT References: <1989Oct19.182027.11171@newcastle.ac.uk> Distribution: comp Organization: Virtual Technologies Inc Lines: 24 In article <1989Oct19.182027.11171@newcastle.ac.uk>, aidan%ncl.shire@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 | +-----------------------------------------------------------------------+