Carl Lowenstein wrote:
On Tue, May 27, 2008 at 1:25 PM, <[EMAIL PROTECTED]> wrote:
I created this 2 line script:
===============================================
#!/bin/sh
echo `whoami`
===============================================
With these perms:
===============================================
4 -rwsr-sr-x 1 seb seb 24 2008-05-27 13:21 test
===============================================
Why doesn't it print seb when I run it as root?....
===============================================
# ./test
root
===============================================
Doesn't setting setuid bit imply it must run as if you are user seb?
How make it do this?
Something between all and nearly all Unix-like operating systems do
not honor SETUID for scripts. For security reasons.
I think it's actually that the interpreter itself is not setuid.
I think if you set /bin/sh to be setuid, it might work.
Or you might have to run the setuid enabled /bin/sh to execute the
script rather than relying on the kernel to call out the interpreter itself
--
Michael O'Keefe | [EMAIL PROTECTED]
Live on and Ride an 06 BMW R12GS HP2 | [EMAIL PROTECTED] / |
I like less more or less less than |Work:+1 858 845 3514 / |
more. UNIX-live it,love it,fork() it |Fax :+1 858 845 2652 /_p_|
My views are MINE ALONE, blah, blah, |Home:+1 760 788 1296 \`O'|
blah, yackety yack - don't come back |Fax :+1 858 _/_\|_,
--
KPLUG-List@kernel-panic.org
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list