Re: root can't sudo

2010-10-01 Thread Chris Davies
T o n g wrote: > I had no problem invoking my scripts embedded with sudo as root before, > but not now in my new installation: > r...@coral:~# echo abc | sudo tee /tmp/t > sudo: can't open /etc/sudoers: Permission denied > sudo: no valid sudoers sources found, quitting What does this give you:

Re: OT Re: root can't sudo

2010-09-28 Thread B. Alexander
Another way to do it would be to have the "invisible" sudo similar to NEEDSUDO="" if [ "`id -u`" != 0 ] ; then NEEDSUDO="sudo" fi echo abc | $NEEDSUDO tee /tmp/t Then, if the uid is not 0 (root), then it inserts the sudo line...If run by root, then NEEDSUDO is empty. --b On Tue, Sep 28, 2010

Re: root can't sudo

2010-09-28 Thread T o n g
On Tue, 28 Sep 2010 09:42:40 -0400, Stephen Powell wrote: > I don't speak for the OP, but my guess is that the OP has a script that > he wants to be able to run either as his non-superuser self or as root. Exactly. Thanks Stephen. -- Tong (remove underscore(s) to reply) http://xpt.sourceforge

Re: OT Re: root can't sudo

2010-09-28 Thread T o n g
On Tue, 28 Sep 2010 16:14:24 +0200, Alois Mahdal wrote: >>> I dont use sudo, but can you explain me,so I will go to bed with more >>> knowledge, why root would need sudo? >> >> invoking my scripts embedded with sudo as root >> > I'm, not sure what you mean by "embedded" here, so my guess is that y

Re: root can't sudo

2010-09-28 Thread Karl Vogel
>> On Tue, 28 Sep 2010 09:42:40 -0400 (EDT), >> Stephen Powell said: S> I don't speak for the OP, but my guess is that the OP has a script that S> he wants to be able to run either as his non-superuser self or as root. Easy. This preserves arguments including spaces: #!/bin/sh PA

Re: root can't sudo

2010-09-28 Thread Camaleón
On Tue, 28 Sep 2010 09:42:40 -0400, Stephen Powell wrote: > On Tue, 28 Sep 2010 06:13:58 -0400 (EDT), Camaleón wrote: >> On Tue, 28 Sep 2010 09:01:10 +0200, Alexander Hintzer wrote: >>> Why should one use "sudo" in addition to being root and thus having >>> all rights? >> >> +1 :-) > > I don't s

Re: OT Re: root can't sudo

2010-09-28 Thread Alois Mahdal
On Tue, 28 Sep 2010 03:26:42 +0200, T o n g wrote: On Tue, 28 Sep 2010 02:58:05 +0200, Thierry Chatelet wrote: I dont use sudo, but can you explain me,so I will go to bed with more knowledge, why root would need sudo? invoking my scripts embedded with sudo as root I'm, not sure what yo

Re: root can't sudo

2010-09-28 Thread Stephen Powell
On Tue, 28 Sep 2010 06:13:58 -0400 (EDT), Camaleón wrote: > On Tue, 28 Sep 2010 09:01:10 +0200, Alexander Hintzer wrote: >> Why should one use "sudo" in addition to being root and thus having all >> rights? > > +1 :-) I don't speak for the OP, but my guess is that the OP has a script that he want

Re: root can't sudo

2010-09-28 Thread B. Alexander
I was looking at this last night. As a test, I pulled root out of sudoers, and it gives the same error as it would for a non-root user, "root is not in the sudoers. This will be reported." I can't figure out why it is giving you a permission denied. Are you running extended acls or anything like t

Re: root can't sudo

2010-09-28 Thread Camaleón
On Tue, 28 Sep 2010 09:01:10 +0200, Alexander Hintzer wrote: > Am 28.09.2010 02:16, schrieb Tom H: >> On Mon, Sep 27, 2010 at 7:53 PM, T o n g wrote: >>> >>> What could be wrong? >> >> grep root /etc/sudoers >> >> > Why should one use "sudo" in addition to being root and thus having all > rights?

Re: root can't sudo

2010-09-28 Thread Alexander Hintzer
Am 28.09.2010 02:16, schrieb Tom H: On Mon, Sep 27, 2010 at 7:53 PM, T o n g wrote: I had no problem invoking my scripts embedded with sudo as root before, but not now in my new installation: r...@coral:~# echo abc | sudo tee /tmp/t sudo: can't open /etc/sudoers: Permission denied sudo: no va

Re: [conclusion] root can't sudo

2010-09-27 Thread Tom H
On Mon, Sep 27, 2010 at 10:52 PM, T o n g wrote: > My bad. > > The failed environment is a linux-live environment that I built myself. > When mirroring it to HD, everything works fine. So it's actually the live > environment's problem, not sudo's. > > Thanks again for your comprehensive tips, whic

[conclusion] root can't sudo

2010-09-27 Thread T o n g
My bad. The failed environment is a linux-live environment that I built myself. When mirroring it to HD, everything works fine. So it's actually the live environment's problem, not sudo's. Thanks again for your comprehensive tips, which I'll garter bellow in case someone else need to troubles

Re: root can't sudo

2010-09-27 Thread Tom H
On Mon, Sep 27, 2010 at 10:22 PM, T o n g wrote: > On Mon, 27 Sep 2010 22:16:34 -0400, Tom H wrote: > >> Do you have the "!root_sudo" option set? > > Nope: > > $ sudo cat /etc/sudoers | grep root_sudo || echo no > no > > Thank you all the same. You're welcome. Do you have an "/etc/pam.d/sudo" fi

Re: root can't sudo

2010-09-27 Thread T o n g
On Mon, 27 Sep 2010 22:16:34 -0400, Tom H wrote: > Do you have the "!root_sudo" option set? Nope: $ sudo cat /etc/sudoers | grep root_sudo || echo no no Thank you all the same. -- Tong (remove underscore(s) to reply) http://xpt.sourceforge.net/techdocs/ http://xpt.sourceforge.net/tools/

Re: root can't sudo

2010-09-27 Thread Tom H
On Mon, Sep 27, 2010 at 10:09 PM, Tom H wrote: > On Mon, Sep 27, 2010 at 8:34 PM, T o n g wrote: >> On Mon, 27 Sep 2010 20:16:05 -0400, Tom H wrote: >> What could be wrong? >>> >>> grep root /etc/sudoers >> >> % grep ^root /etc/sudoers >> root ALL=(ALL) ALL >> >> It has always been there. >

Re: root can't sudo

2010-09-27 Thread Tom H
On Mon, Sep 27, 2010 at 8:34 PM, T o n g wrote: > On Mon, 27 Sep 2010 20:16:05 -0400, Tom H wrote: > >>> What could be wrong? >> >> grep root /etc/sudoers > > % grep ^root /etc/sudoers > root ALL=(ALL) ALL > > It has always been there. Sorry, no idea then. -- To UNSUBSCRIBE, email to debian-us

Re: OT Re: root can't sudo

2010-09-27 Thread Tom H
> I dont use sudo, but can you explain me,so I will go to bed with more > knowledge, why root would need sudo? It doesn't make any sense to use sudo as root without an "-u user" (and therefore to sudo to root as root) but it should work. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.deb

Re: OT Re: root can't sudo

2010-09-27 Thread Kousik Maiti
sudo means what super user can do, you can also do provided you have given permission in /etc/sudoers file. By default in certain system sudoers file is read only.If you want to change that file make it writeable,modify and then again make it read only. On Tue, Sep 28, 2010 at 6:28 AM, Thierry C

Re: OT Re: root can't sudo

2010-09-27 Thread Kelly Clowers
On Mon, Sep 27, 2010 at 17:58, Thierry Chatelet wrote: > I dont use sudo, but can you explain me,so I will go to bed with more > knowledge, why root would need sudo? > Thierry I have used sudo as root - but with a username as an argument. Without a username, it defaults to root, and I can't figur

OT Re: root can't sudo

2010-09-27 Thread Thierry Chatelet
I dont use sudo, but can you explain me,so I will go to bed with more knowledge, why root would need sudo? Thierry -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201

Re: root can't sudo

2010-09-27 Thread T o n g
On Mon, 27 Sep 2010 20:16:05 -0400, Tom H wrote: >> What could be wrong? > > grep root /etc/sudoers % grep ^root /etc/sudoers root ALL=(ALL) ALL It has always been there. -- Tong (remove underscore(s) to reply) http://xpt.sourceforge.net/techdocs/ http://xpt.sourceforge.net/tools/ -- T

Re: root can't sudo

2010-09-27 Thread Tom H
On Mon, Sep 27, 2010 at 7:53 PM, T o n g wrote: > > I had no problem invoking my scripts embedded with sudo as root before, > but not now in my new installation: > > r...@coral:~# echo abc | sudo tee /tmp/t > sudo: can't open /etc/sudoers: Permission denied > sudo: no valid sudoers sources found,