From: Joost Roeleveld <joost@antarean.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Where does sudo get the PATH ?
Date: Wed, 10 Oct 2012 20:43:49 +0200 [thread overview]
Message-ID: <2605336.yuE8B9dzFI@eve> (raw)
In-Reply-To: <87pq4q74sx.fsf@yahoo.fr>
On Wednesday, October 10, 2012 04:57:50 PM Nicolas Richard wrote:
> >>>>> "Joost" == J Roeleveld <joost@antarean.org> writes:
> Joost> And, what is in the .bash_profile and .bashrc files in your
> Joost> homedir and in root's homedir?
>
> In my homedir:
> .bash_profile loads .bashrc
> .bashrc says export PATH="~/bin/overrideglobal:${PATH}:~/bin" (and
> defines some aliases)
Does it load any global default?
> In root's: I have no such files.
>
> Maybe it would be less distracting if I don't use a shell at all :
>
> youngfrog@geodiff-mac3 ~ $ sudo -i env | grep ^PATH
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/
> usr/i686-pc-linux-gnu/gcc-bin/4.5.4:/usr/local/texlive/2012/bin/i386-linux:/
> root/bin
>
> youngfrog@geodiff-mac3 ~ $ sudo env | grep ^PATH
> PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/
> usr/local/texlive/2011/bin/i386-linux
>
>
> Joost> What do you get with "echo $PATH" when not using sudo?
>
> You mean, when I'm logged in as root ? Then it's the same as when using
> sudo -i.
No, when you're logged in as your normal user.
In other words, what is in the environment when you are normally logged in?
--
Joost
next prev parent reply other threads:[~2012-10-10 18:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 14:20 [gentoo-user] Where does sudo get the PATH ? Nicolas Richard
2012-10-09 5:11 ` J. Roeleveld
2012-10-09 15:03 ` [gentoo-user] " Nicolas Richard
2012-10-10 9:49 ` J. Roeleveld
2012-10-10 9:50 ` J. Roeleveld
2012-10-10 14:57 ` Nicolas Richard
2012-10-10 18:43 ` Joost Roeleveld [this message]
2012-10-11 14:25 ` Nicolas Richard
2012-10-11 16:24 ` Pandu Poluan
2012-10-11 16:50 ` Nicolas Richard
2012-10-11 17:24 ` Pandu Poluan
2012-10-12 8:55 ` Nicolas Richard
2012-10-23 9:26 ` Nicolas Richard
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=2605336.yuE8B9dzFI@eve \
--to=joost@antarean.org \
--cc=gentoo-user@lists.gentoo.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