From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,a1fe009cb39103d4,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-03-08 02:49:59 PST Path: bga.com!news.sprintlink.net!pipex!warwick!clyde.open.ac.uk!adminmbx From: rpblake@ASSP01.open.ac.uk (Robert Blake) Newsgroups: comp.unix.osf.osf1 Subject: Help: Set-user-ID Date: 07 Mar 1995 15:17:55 GMT Organization: The Open University Distribution: world Message-ID: NNTP-Posting-Host: yan.open.ac.uk I've been trying to write a shell script that other users can run and appear to be me for the duration of the command. I'm using Alpha OSF/1 v1.3. I've written a very simple shell script called fred: #!/bin/sh echo Hi!! whoami rm /usr/user1/temp/test~ test~ is a file that only user1 has write permission to. Having written this as user1, I then 'chmod 4655 fred' so the permissions look thus: -rwSr-xr-x 1 user1 physics 117 Mar 07 14:53 fred I then log in as user2 and try to run it. The output is: Hi!! user2 rm: override protection 700 for /usr/user1/temp/test~? y rm: /usr/user1/temp/test~ not removed. Permission denied Anyone any idea what I'm doing wrong? --------------------------------------------------------------------------- _/_/_/_/_/ _/ _/ _/ Rob Blake (R.P.Blake@open.ac.uk) _/ _/ _/ [Overworked PhD student (Danger! Irony chip overload)] _/_/_/_/_/ _/_/ _/ Quote of the week : "An optimist believes that this is _/ _/ _/ the best of all possible worlds. A pessimist fears _/ _/_/_/ that this is true." ---------------------------------------------------------------------------