Gentoo Archives: gentoo-user

From: Hinko Kocevar <hinko.kocevar@×××××××××.si>
To: gentoo-user@l.g.o
Subject: [gentoo-user] SUID
Date: Mon, 02 Mar 2009 08:31:37

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:
hinkok@alala /tmp $ cat 

touch /sbin/
exit $?

hinkok@alala /tmp $ sudo chmod +x 
hinkok@alala /tmp $ sudo chown root:root 
hinkok@alala /tmp $ sudo chmod +s 
hinkok@alala /tmp $ ls -l 
-rwsr-sr-x 1 root root 32 Mar  2 09:27
hinkok@alala /tmp $ sh -x 
+ touch /sbin/
touch: cannot touch `/sbin/': Permission denied

Can somebody help me with that?

Thank you!

Best regards,
Hinko Koèevar, OSS developer
ÈETRTA POT, d.o.o.
Planina 3, 4000 Kranj, SI EU
tel     ++386 (0) 4 280 66 03
e-mail  hinko.kocevar@×××××××××.si


Subject Author
Re: [gentoo-user] SUID "Tomáš Krasničan" <krasko@××××××.sk>
[gentoo-user] Re: SUID ABCD <en.ABCD@×××××.com>