public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Tomáš Krasničan" <krasko@krasko.sk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] SUID
Date: Mon, 02 Mar 2009 09:43:19 +0100	[thread overview]
Message-ID: <49AB9C27.10009@krasko.sk> (raw)
In-Reply-To: <49AB9907.1040509@cetrtapot.si>

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]

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:
> 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

[-- Attachment #2: krasko.vcf --]
[-- Type: text/x-vcard, Size: 232 bytes --]

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:krasko@krasko.sk
tel;cell:+420 605 520 368
x-mozilla-html:FALSE
version:2.1
end:vcard


  reply	other threads:[~2009-03-02  8:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02  8:29 [gentoo-user] SUID Hinko Kocevar
2009-03-02  8:43 ` Tomáš Krasničan [this message]
2009-03-02  8:50 ` [gentoo-user] SUID ABCD
2009-03-02  9:18   ` Hinko Kocevar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49AB9C27.10009@krasko.sk \
    --to=krasko@krasko.sk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox