Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* setuid scripts on DUX 4.0D: (2)why doesnt work?
@ 1999-02-06  5:00 Ori Tzoran
  1999-02-08  5:00 ` Nikola Milutinovic
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ori Tzoran @ 1999-02-06  5:00 UTC (permalink / raw)


hello,

the following example doesn't work:

#!/sbin/sh
# test suid
id -u
ps -f -p $$
exit 0

ls -l test.suid
-r-sr-x--x ... root system test.suid

attempt to run as user "ori" (uid = 123) gives:
123
USER   PID  PPID ...    COMMAND
ori   1234  988  ....   sh test.suid

tried man on sh(1b), sh(1p), setuid(2) etc: nothing metions DUX behaves differently than other unix variants.
what's the problem?



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

* Re: setuid scripts on DUX 4.0D: (2)why doesnt work?
  1999-02-06  5:00 setuid scripts on DUX 4.0D: (2)why doesnt work? Ori Tzoran
@ 1999-02-08  5:00 ` Nikola Milutinovic
  1999-02-11  5:00   ` Ury Segal
  1999-02-08  5:00 ` Barry Margolin
  1999-02-10  5:00 ` Bruce Barnett
  2 siblings, 1 reply; 5+ messages in thread
From: Nikola Milutinovic @ 1999-02-08  5:00 UTC (permalink / raw)


Ori Tzoran wrote:
> 
> hello,
> 
> the following example doesn't work:
> 
> #!/sbin/sh
> # test suid
> id -u
> ps -f -p $$
> exit 0
> 
> ls -l test.suid
> -r-sr-x--x ... root system test.suid
> 
> attempt to run as user "ori" (uid = 123) gives:
> 123
> USER   PID  PPID ...    COMMAND
> ori   1234  988  ....   sh test.suid
> 
> tried man on sh(1b), sh(1p), setuid(2) etc: nothing metions DUX behaves differently than other unix variants.
> what's the problem?

Oh, and I forgot to ask, are sh, ksh, ... on other UNIXes SetUID to
root? Because, otherwise, I don't see how you can get SUID root script
to run as desired.

Nix.



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

* Re: setuid scripts on DUX 4.0D: (2)why doesnt work?
  1999-02-06  5:00 setuid scripts on DUX 4.0D: (2)why doesnt work? Ori Tzoran
  1999-02-08  5:00 ` Nikola Milutinovic
@ 1999-02-08  5:00 ` Barry Margolin
  1999-02-10  5:00 ` Bruce Barnett
  2 siblings, 0 replies; 5+ messages in thread
From: Barry Margolin @ 1999-02-08  5:00 UTC (permalink / raw)


In article <36BB76D4.CFE04F8A@netvision.net.il>,
Ori Tzoran  <ori_tz@netvision.net.il> wrote:
>hello,
>
>the following example doesn't work:
>
>#!/sbin/sh
># test suid
>id -u
>ps -f -p $$
>exit 0
>
>ls -l test.suid
>-r-sr-x--x ... root system test.suid
>
>attempt to run as user "ori" (uid = 123) gives:
>123
>USER   PID  PPID ...    COMMAND
>ori   1234  988  ....   sh test.suid
>
>tried man on sh(1b), sh(1p), setuid(2) etc: nothing metions DUX behaves
>differently than other unix variants.
>what's the problem?

Many Unix variants prohibit setuid scripts.  There are known security holes
with them.

If this is documented anywhere, I would expect it to be in the execve(2)
man page.

-- 
Barry Margolin, barmar@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Don't bother cc'ing followups to me.



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

* Re: setuid scripts on DUX 4.0D: (2)why doesnt work?
  1999-02-06  5:00 setuid scripts on DUX 4.0D: (2)why doesnt work? Ori Tzoran
  1999-02-08  5:00 ` Nikola Milutinovic
  1999-02-08  5:00 ` Barry Margolin
@ 1999-02-10  5:00 ` Bruce Barnett
  2 siblings, 0 replies; 5+ messages in thread
From: Bruce Barnett @ 1999-02-10  5:00 UTC (permalink / raw)


Ori Tzoran <ori_tz@netvision.net.il> writes:

> what's the problem?

Your OS may not allow setuid shell scripts because it may be a security
hole if it is allowed, and some sysadmin's don't know this and create
them anyway.


-- 
Bruce  <barnett at crd. ge. com> (speaking as myself, and not a GE employee)



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

* Re: setuid scripts on DUX 4.0D: (2)why doesnt work?
  1999-02-08  5:00 ` Nikola Milutinovic
@ 1999-02-11  5:00   ` Ury Segal
  0 siblings, 0 replies; 5+ messages in thread
From: Ury Segal @ 1999-02-11  5:00 UTC (permalink / raw)




Nikola Milutinovic wrote:

> Ori Tzoran wrote:
> >
> > hello,
> >
> > the following example doesn't work:
> >
> > #!/sbin/sh
> > # test suid
> > id -u
> > ps -f -p $$
> > exit 0
> >
> > ls -l test.suid
> > -r-sr-x--x ... root system test.suid
> >
> > what's the problem?

You should add "-b" after the first line, ie.e

 #!/sbin/sh -b
--
Ury Segal
e-mail: ury@ibm.net
Phone: 972-52-651629 , ICQ: 15153160





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

end of thread, other threads:[~1999-02-11  5:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-02-06  5:00 setuid scripts on DUX 4.0D: (2)why doesnt work? Ori Tzoran
1999-02-08  5:00 ` Nikola Milutinovic
1999-02-11  5:00   ` Ury Segal
1999-02-08  5:00 ` Barry Margolin
1999-02-10  5:00 ` Bruce Barnett

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