FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 09-28-2010, 09:42 PM
T o n g
 
Default OT root can't sudo

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 you
> mean making something like this work for both user and root: . . .

Thanks for the clear illustration. Yep, that's what I meant.

Besides, I share my aliases between my normal account and root account,
many of them are using sudo and I don't want to define two sets for the
same functionalities.

cheers

--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: i7tnh0$75o$1@dough.gmane.org">http://lists.debian.org/i7tnh0$75o$1@dough.gmane.org
 
Old 09-29-2010, 12:30 AM
"B. Alexander"
 
Default OT root can't sudo

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 at 5:42 PM, T o n g <mlist4suntong@yahoo.com> wrote:


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 you

> mean making something like this work for both user and root: . . .



Thanks for the clear illustration. Yep, that's what I meant.



Besides, I share my aliases between my normal account and root account,

many of them are using sudo and I don't want to define two sets for the

same functionalities.



cheers



--

Tong (remove underscore(s) to reply)

*http://xpt.sourceforge.net/techdocs/

*http://xpt.sourceforge.net/tools/





--

To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org

with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: http://lists.debian.org/i7tnh0$75o$1@dough.gmane.org
 

Thread Tools




All times are GMT. The time now is 02:50 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org