public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] SUID
@ 2009-03-02  8:29 Hinko Kocevar
  2009-03-02  8:43 ` Tomáš Krasničan
  2009-03-02  8:50 ` [gentoo-user] SUID ABCD
  0 siblings, 2 replies; 4+ messages in thread
From: Hinko Kocevar @ 2009-03-02  8:29 UTC (permalink / raw
  To: gentoo-user

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:
hinkok@alala /tmp $ cat test.sh 
#!/bin/sh

touch /sbin/foo.bar
exit $?

hinkok@alala /tmp $ sudo chmod +x test.sh 
hinkok@alala /tmp $ sudo chown root:root test.sh 
hinkok@alala /tmp $ sudo chmod +s test.sh 
hinkok@alala /tmp $ ls -l test.sh 
-rwsr-sr-x 1 root root 32 Mar  2 09:27 test.sh
hinkok@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
-- 
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@cetrtapot.si
http    www.cetrtapot.si




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-02  9:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-02  8:29 [gentoo-user] SUID Hinko Kocevar
2009-03-02  8:43 ` Tomáš Krasničan
2009-03-02  8:50 ` [gentoo-user] SUID ABCD
2009-03-02  9:18   ` Hinko Kocevar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox