s[et]uid doesn't work
    Robert Nagler 
    mcvax!olsen!nagler at uunet.uu.net
       
    Wed Feb  1 06:45:57 AEST 1989
    
    
  
Loki Jorgenson writes:
> I have set a root owned sh or csh script file with the mode 4755 
> and tried to execute it as user.....  but this doesn't work....
Had a similar problem recently.  Here's a clip from the "csh" manual:
     -b   Force a "break"  from  option  processing.   Subsequent
          command-line  arguments  are not interpreted as C-Shell
          options.  This allows  the  passing  of  options  to  a
          script  without  confusion.   The  shell does not run a
          set-user-ID script unless this option is present.
I don't know why this is required, but it was sure difficult to find.
Therefore you must do what the moderator suggests with a twist for csh
scripts: Put "#!/bin/csh -b" at the top of the file.
[[ Oh yeah.  That tripped me up, too, awhile ago.  Can't believe I forgot
it, because I was pretty mad (at the time) when I finally figured it out.
Sun actually made that change quite awhile ago:  you need "-b" under 3.2,
for example.  I'm not sure, but I think the change was made in version 3
(that is, starting with 3.0).  --wnl ]]
    
    
More information about the Comp.sys.sun
mailing list