Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Help: Set-user-ID
@ 1995-03-07 15:17 Robert Blake
  1995-03-08 16:02 ` Mike Simons
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert Blake @ 1995-03-07 15:17 UTC (permalink / raw)



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."

 ---------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1995-03-09  3:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-03-07 15:17 Help: Set-user-ID Robert Blake
1995-03-08 16:02 ` Mike Simons
1995-03-08 22:33 ` Walter Karig
1995-03-09  3:37 ` Spider Boardman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox