[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?
I understand that the suid (and sgid) bits are ignored on scripts. All scripts, I believe -- anything using a hashbang. So if you really want to run something suid/sgid then you have to write a c program or wrapper. Regards, ..jim -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
