qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: swz <swzhengst@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] why run qemu not use sudo, the /etc/qemu-ifup will not run
Date: Wed, 16 Nov 2005 11:02:27 +0800	[thread overview]
Message-ID: <1132110147.4464.24.camel@localhost.localdomain> (raw)
In-Reply-To: <20051115153112.3607d653.user05@kyberwelt.de>

On 二, 2005-11-15 at 15:31 +0100, hmm wrote:
> hi
> 
> > I put the next three line into /etc/qemu-ifup.
> > #!/bin/sh
> > echo $* >> /tmp/qemu-ifup.$$
> > sudo /sbin/ifconfig ${1##/*/} 0.0.0.0 promisc up
> > sudo /usr/sbin/brctl addif bridge ${1##/*/}

> 
> as you did not mention /etc/sudoers i suspect you did not configure
> your sudoers(5) file. 

I have configure my /etc/sudoers, like that:

Cmnd_Alias QEMU=/sbin/ifconfig,/usr/sbin/brctl
admin   ALL=(ALL) ALL
admin   ALL=NOPASSWD:QEMU


So if someone run qemu, it will use sodu to run ifconfig and brctl.

my question is: when I configure no mattler like above or as bellow: 

#!/bin/sh
echo $* >> /tmp/qemu-ifup.$$
/sbin/ifconfig ${1##/*/} 0.0.0.0 promisc up
/usr/sbin/brctl addif bridge ${1##/*/}

the script will run when use root. But when not use root or sudo, the
script won't run. I don't know why. ( the script: 
"echo $* >> /tmp/qemu-ifup.$$"  can tell me whether the script was run)

      reply	other threads:[~2005-11-16  3:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-14 21:53 [Qemu-devel] Qemu bug when building for OpenBSD Dave Feustel
2005-11-14 22:05 ` Paul Brook
2005-11-14 23:13   ` Dave Feustel
2005-11-14 23:20     ` Paul Brook
2005-11-15 10:41 ` [Qemu-devel] why run qemu not use sudo, the /etc/qemu-ifup will not run swz
2005-11-15 14:31   ` hmm
2005-11-16  3:02     ` swz [this message]

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=1132110147.4464.24.camel@localhost.localdomain \
    --to=swzhengst@gmail.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).