From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1020c6,e0a9823ca423b93b X-Google-Attributes: gid1020c6,public X-Google-Thread: 1012a6,e0a9823ca423b93b X-Google-Attributes: gid1012a6,public X-Google-Thread: fee84,e0a9823ca423b93b X-Google-Attributes: gidfee84,public From: bsh20858@news.fhda.edu (Brian S Hiles) Subject: Re: Cannot Set Owner & User-ID bit to Root via script Date: 1996/08/16 Message-ID: <4v0epb$aff@tiptoe.fhda.edu>#1/1 X-Deja-AN: 174490062 references: <321333D2.41C6@sms.lmco.com> <3213B0BC.CF6@pangea.stanford.edu> followup-to: comp.unix.osf.osf1,comp.unix.shell,comp.unix.admin organization: Foothill DeAnza College District newsgroups: comp.unix.osf.osf1,comp.unix.shell,comp.unix.admin Phil Farrell (farrell@pangea.stanford.edu) wrote: : Setuid shell scripts are inherently insecure and are a convenient : way for hackers to get root access. Because of this, I do believe : that there is some kernel parameter in Digital UNIX that prevents : shell scripts from running setuid, and that this parameter is : turned on by default. : You should try to rewrite your script in C or some other compiled : language which can more safely be made into a setuid program. I have to guess at the query because the previous responder deleted it. (Don't do that!) You have a few options: I. Turn the shell program into a binary with the "shc" program which I have mentioned in a previous thread. II. Use the "-p" option in ksh, with or without the "set_uid" front-end that comes with the ksh93 distribution archive at: http://www.research.att.com/orgs/ssr/book/reuse/ #ksh93 III. Download and compile "indir", a set_uid front-end that is designed to eliminate the well-known security holes of setuid shell scripts. ftp ftp.uu.net/archive/comp.sources.unix/volume21/indir indir Safe way to run setuid shell scripts ftp ftp.uu.net/archive/comp.sources.unix/volume22/indir.pch indir.pch Patch -- safely execute (set[ug]id) scripts -Brian -- ,---. ,---. ,---. ,---. ,---. ,---. ,---. / _ \ / _ \ / _ \ / _ \ / _ \ / _ \ / _ \ .' / \ `.' / mailto:bsh20858@challenger.atc.fhda.edu \ `.' / \ `. __,' `.___,' `.___,' `.___,' `.___,' `.___,' `.___,' `.__