why doesn't setuid work?

1) I create a new user:

useradd test -m -G audio

passwd test

..ok

2) I'm logged in with another user [name: "user"], and I create a script
[foo.sh]:

#!/bin/sh

whoami

..ok

3) I'm still logged in with another user ["user" - not the "test" user] and:

chown test:test foo.sh

chmod 4707 foo.sh

..ok

4) BUT: I'm still logged in with "user", and I "./foo.sh", but the "whoami"
in the foo.sh say's "user" why isn't the script running with "test" user??
:(

please help me

Reply via email to