Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Re: [Q] SET-USER-ID and SHELL SCRIPTS
  1996-03-12  5:00 [Q] SET-USER-ID and SHELL SCRIPTS Gareth Owen
@ 1996-03-11  5:00 ` Dave Parker
  1996-03-12  5:00 ` John P. Speno
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Parker @ 1996-03-11  5:00 UTC (permalink / raw)



In article <826628780snz@spclmway.demon.co.uk>, Gareth Owen <geo@spclmway.demon.co.uk> writes:
|>I am trying to use a shell script with set user id to allow a user root 
|>priveledges to carry out a fixed task.
|>

This won't work with shell scripts for security reasons.  I suspect that if 
your commands to carry out the "fixed task" were setuid, you'd be all set.

Presumably, if this were allowed, any user could create a shell script and have
it setuid to root and then have access to do anything.
-- 

----------------------------------------------------------------------
Dave Parker					djp@unx.dec.com
UNIX Engineering				Digital Equipment Corp
	The comments, opinions, etc. within are mine.....



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

* [Q] SET-USER-ID and SHELL SCRIPTS
@ 1996-03-12  5:00 Gareth Owen
  1996-03-11  5:00 ` Dave Parker
  1996-03-12  5:00 ` John P. Speno
  0 siblings, 2 replies; 3+ messages in thread
From: Gareth Owen @ 1996-03-12  5:00 UTC (permalink / raw)


I am trying to use a shell script with set user id to allow a user root 
priveledges to carry out a fixed task.

The shell script has the following permissions:

rwsr-sr-x root dbms

The user trying to run the script is in the group dbms.  Root is also a 
member of the group dbms.

The script goes something like this:

#!/bin/sh
id > /tmp/trace
#do some root specific stuff here

but the output i get in the trace file indicates that the script is not
being run with the effective user id of root, but instead as the real user.
Is there some security feature of OSF/1 that stops you doing set-user-id to 
root on shell scripts (like /bin/sh setting the real user id back)?

I'm running DEC UNIX v3.2c on and AXP3000/400.

Any ideas?

Gareth Owen



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

* Re: [Q] SET-USER-ID and SHELL SCRIPTS
  1996-03-12  5:00 [Q] SET-USER-ID and SHELL SCRIPTS Gareth Owen
  1996-03-11  5:00 ` Dave Parker
@ 1996-03-12  5:00 ` John P. Speno
  1 sibling, 0 replies; 3+ messages in thread
From: John P. Speno @ 1996-03-12  5:00 UTC (permalink / raw)


In <826628780snz@spclmway.demon.co.uk> Gareth Owen <geo@spclmway.demon.co.uk> writes:

>Is there some security feature of OSF/1 that stops you doing set-user-id to 
>root on shell scripts (like /bin/sh setting the real user id back)?

Digital Unix does not honor SUID bits on shell scripts. It will honor those
bits on compiled binaries however, so you will have to use a wrapper program
to invoke your shell script.

Larry Wall's wrapsuid perl script comes with the perl package. It will do
the wrapping for you, and it has a built in man page for your reference.

P.S. SUID shell scripts are insecure. If you must write one, write it in
perl, and read up on making safe SUID programs.

-- 
John P. Speno, speno@swarthmore.edu, Swarthmore College Computing Center
	     "There is no wisdom greater than kindness."




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

end of thread, other threads:[~1996-03-12  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-03-12  5:00 [Q] SET-USER-ID and SHELL SCRIPTS Gareth Owen
1996-03-11  5:00 ` Dave Parker
1996-03-12  5:00 ` John P. Speno

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