Hey, ho--
Here's (one of) today's non-critical problems that's getting on my
nerves, so hopefully somebody can help.
I've finally got around to setting up sudo. It works fine, except for
one thing.
I don't just give myself blanket permissions to sudo to all commands; I
made a Cmd_Alias group
On Wed, 6 Jul 2005, Holly Bostick wrote:
Echo is in the sudo-ed group, and echo isn't the problem-- the problem
is that permission is refused to write to the file itself (which is an
error *from* echo, so it would seem that echo itself is OK as far as
sudo goes). Which means that I have to su
Le Mercredi, 6 Juillet 2005 15.52, Holly Bostick a ecrit :
Hey, ho--
Here's (one of) today's non-critical problems that's getting on my
nerves, so hopefully somebody can help.
I've finally got around to setting up sudo. It works fine, except for
one thing.
I don't just give myself blanket
On Wed, 2005-07-06 at 15:52 +0200, Holly Bostick wrote:
Echo is in the sudo-ed group, and echo isn't the problem-- the problem
is that permission is refused to write to the file itself (which is an
error *from* echo, so it would seem that echo itself is OK as far as
sudo goes). Which means
A. Khattri schreef:
On Wed, 6 Jul 2005, Holly Bostick wrote:
Echo is in the sudo-ed group, and echo isn't the problem-- the problem
is that permission is refused to write to the file itself (which is an
error *from* echo, so it would seem that echo itself is OK as far as
sudo goes). Which
Edward Catmur schreef:
On Wed, 2005-07-06 at 15:52 +0200, Holly Bostick wrote:
Echo is in the sudo-ed group, and echo isn't the problem-- the problem
is that permission is refused to write to the file itself (which is an
error *from* echo, so it would seem that echo itself is OK as far as
sudo
On 16:54 Wed 06 Jul , Holly Bostick wrote:
OK, you all likely realize that I responded before I had got the three
more messages telling me what to do.
I'm sure it will work (three people telling you the exact same thing is
pretty convincing ;-) ), but what I don't understand is why/how,
[EMAIL PROTECTED] schreef:
Le Mercredi, 6 Juillet 2005 15.52, Holly Bostick a ecrit :
Hey, ho--
I've finally got around to setting up sudo. It works fine, except for
one thing.
I made a Cmd_Alias group which includes a lot of utility apps. And, like
many of you, I included emerge in this
On Wed, 6 Jul 2005 16:12:18 +0100, David Morgan wrote:
Nope, I don't think you can do it with sudo since bash uses whitespace
as a separator, so if you do sudo echo foo bar, it'll look for a
single command echo foo bar, which is not what you want - you want
a command echo with argument foo,
David Morgan wrote:
afaik you can only do it with su -c echo foo bar, which stops bash
from doing anything with the or the whitespace to begin with, but
then passes everything inside the double quotes to another shell, which
gets started by su -c
It's kind of annoying, I know, but I don't
Holly Bostick wrote:
I'm really lost. Where am I going wrong?
check my other post.
Oh, btw, just remembered-- this is bash 3. Does that make a difference?
No.
Christoph
--
echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr * !#:2 [EMAIL PROTECTED]
--
gentoo-user@gentoo.org mailing list
On Wednesday 06 July 2005 17.21, Holly Bostick wrote:
To solve your problem, I would just do:
chgrp -R portage /etc/portage
chmod -R g+w /etc/portage
Well, it didn't work (this to all the respondents).
Are you in the portage group?
sudo echo 'media-video/xine-ui ~x86'
Christoph Gysin schreef:
David Morgan wrote:
afaik you can only do it with su -c echo foo bar, which stops bash
from doing anything with the or the whitespace to begin with, but
then passes everything inside the double quotes to another shell, which
gets started by su -c
It's kind of
Holly Bostick wrote:
Thank you, Christoph
Your welcome.
Last question on this subject-- is this all just bash scripting (so I
can learn about it if I sit and study the abs-guide) or is there
someplace else I should check out if I want to learn how to write this
stuff myself?
Yes, this
Holly Bostick wrote:
I don't just give myself blanket permissions to sudo to all commands; I
made a Cmd_Alias group which includes a lot of utility apps. And, like
many of you, I included emerge in this group.
Christoph Gysin schreef:
$ sudo bash -c echo package ~x86
Richard Fish schreef:
BTW Holly,
You should recognize that from a security standpoint allowing yourself
to execute bash is really giving yourself blanket permissions to sudo
to all commands. You might as well make life easier on yourself and
just make your sudo settings ALL=(ALL) NOPASSWD:
Holly Bostick wrote:
Richard Fish schreef:
BTW Holly,
You should recognize that from a security standpoint allowing yourself
to execute bash is really giving yourself blanket permissions to sudo
to all commands. You might as well make life easier on yourself and
just make your sudo settings
Holly Bostick wrote:
Or is this not a valid proof that there are some limits left?
Not, it's not. A simple sudo bash will give you a root shell.
The problem in your example was the missing quotes:
$ sudo bash -c /etc/init.d/samba restart
Christoph
--
echo mailto: NOSPAM !#$.'*'|sed 's. ..'|tr
Richard Fish schreef:
Holly Bostick wrote:
Richard Fish schreef:
BTW Holly,
You should recognize that from a security standpoint allowing yourself
to execute bash is really giving yourself blanket permissions to sudo
to all commands. You might as well make life easier on yourself and
Holly Bostick wrote:
So it will. Shoot. Oh, well. Maybe I'll rework this, or I should then
ask for:
1) firewall recommendations (personal, as the router has one too; atm
I'm liking firestarter)
I've been very pleased with Shorewall as a firewall.
--
Manuel A. McLure KE6TAW [EMAIL PROTECTED]
Holly Bostick wrote:
[EMAIL PROTECTED] schreef:
I think the problem come from the fact that echo is sudo-ed but the shell
redirection isn't.
Compare this:
su -c echo foo /etc/portage/whatever
and
su -c echo foo /etc/portage/whatever
The first one will succeed, but not the second.
Well,
21 matches
Mail list logo