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
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
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
> 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
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
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
6 matches
Mail list logo