Hi,
#! scripts can not run as suid.
Regards,
krasko
Hinko Kocevar wrote:
Hi,
I'm trying to touch a file in /sbin during boot time
and would like to do that with a normal user by running
SUIDed shell script.
I have following script:
hin...@alala /tmp $ cat test.sh
#!/bin/sh
touch /sbin/foo.bar
exit $?
hin...@alala /tmp $ sudo chmod +x test.sh
hin...@alala /tmp $ sudo chown root:root test.sh
hin...@alala /tmp $ sudo chmod +s test.sh
hin...@alala /tmp $ ls -l test.sh
-rwsr-sr-x 1 root root 32 Mar 2 09:27 test.sh
hin...@alala /tmp $ sh -x test.sh
+ touch /sbin/foo.bar
touch: cannot touch `/sbin/foo.bar': Permission denied
Can somebody help me with that?
Thank you!
Best regards,
Hinko
begin:vcard
fn;quoted-printable:Tom=C3=A1=C5=A1 Krasni=C4=8Dan
n;quoted-printable;quoted-printable:Krasni=C4=8Dan;Tom=C3=A1=C5=A1
email;internet:kra...@krasko.sk
tel;cell:+420 605 520 368
x-mozilla-html:FALSE
version:2.1
end:vcard