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.

    carl
-- 
 carl lowenstein marine physical lab u.c. san diego
 [EMAIL PROTECTED]


-- 
KPLUG-List@kernel-panic.org
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to