Re: how to make an executable run as another user

2004-09-18 Thread Matthew Seaman
On Fri, Sep 17, 2004 at 04:53:31PM -0400, mailing lists at MacTutor wrote: QUOTE: In most UNIX kernels there exists what is called a 'race condition' when executing scripts. Scripts are pieces of code which are interpreted by, strangely enough, interpreters. Common examples of

Re: how to make an executable run as another user

2004-09-18 Thread Richard Bradley
I understand now. Thanks very much for all your help. Rich On Saturday 18 September 2004 11:31 am, Matthew Seaman wrote: On Fri, Sep 17, 2004 at 04:53:31PM -0400, mailing lists at MacTutor wrote: QUOTE: In most UNIX kernels there exists what is called a 'race condition' when executing

how to make an executable run as another user

2004-09-17 Thread Richard Bradley
Um. I feel silly asking this. But I can't work it out. I want a shell script to run as another user. I always thought this was easy to do with the setuid bit, but never tried it before. I read man chmod and found this: . 4000(the setuid bit). Executable files with this bit set will

Re: how to make an executable run as another user

2004-09-17 Thread Subhro
man sudo is what you need. Install it from the ports collection Regards S. On Fri, 17 Sep 2004 19:50:19 +, Richard Bradley [EMAIL PROTECTED] wrote: Um. I feel silly asking this. But I can't work it out. I want a shell script to run as another user. I always thought this was easy to do

Re: how to make an executable run as another user

2004-09-17 Thread Bill Moran
Richard Bradley [EMAIL PROTECTED] wrote: Um. I feel silly asking this. But I can't work it out. Not silly, common problem for shell script writers. I want a shell script to run as another user. I always thought this was easy to do with the setuid bit, but never tried it before. I read man

Re: how to make an executable run as another user

2004-09-17 Thread mailing lists at MacTutor
Rich, Someone else had responded to your post explaining that setuid does not work with shell scripts. Nor does it work with any interpreted input. The following article might help explain this (and others): http://www.evolt.org/article/UNIX_File_Permissions_and_Setuid_Part_2/ 18/263/