1 |
Hi, |
2 |
|
3 |
#! scripts can not run as suid. |
4 |
|
5 |
Regards, |
6 |
krasko |
7 |
|
8 |
Hinko Kocevar wrote: |
9 |
> Hi, |
10 |
> |
11 |
> I'm trying to touch a file in /sbin during boot time |
12 |
> and would like to do that with a normal user by running |
13 |
> SUIDed shell script. |
14 |
> I have following script: |
15 |
> hinkok@alala /tmp $ cat test.sh |
16 |
> #!/bin/sh |
17 |
> |
18 |
> touch /sbin/foo.bar |
19 |
> exit $? |
20 |
> |
21 |
> hinkok@alala /tmp $ sudo chmod +x test.sh |
22 |
> hinkok@alala /tmp $ sudo chown root:root test.sh |
23 |
> hinkok@alala /tmp $ sudo chmod +s test.sh |
24 |
> hinkok@alala /tmp $ ls -l test.sh |
25 |
> -rwsr-sr-x 1 root root 32 Mar 2 09:27 test.sh |
26 |
> hinkok@alala /tmp $ sh -x test.sh |
27 |
> + touch /sbin/foo.bar |
28 |
> touch: cannot touch `/sbin/foo.bar': Permission denied |
29 |
> |
30 |
> Can somebody help me with that? |
31 |
> |
32 |
> Thank you! |
33 |
> |
34 |
> Best regards, |
35 |
> Hinko |