Re: sudo and/or PATH problem

Mark A Basil <[email protected]>
Newsgroups gmane.linux.gentoo.newbies
Message-ID <[email protected]>
Try adding the following to your .bashrc:

PATH=$PATH:/sbin:/usr/sbin[:./]
export PATH

That last part - ':./' - is optional.  If you use it, you won't have to specify './' when calling a program in your current directory.  Some will say that it is bad to do (for security reasons), but having it as the last path searched is just fine in my opinion.

-mb


On Sat, 28 Sep 2002 16:01:51 -0500
Scott Robbins <[email protected]> wrote:

> On Sat, Sep 28, 2002 at 01:32:33PM -0500, Levente -Levi- Littvay wrote:
> > Hello
> > 
> > I am used to using sudo, so I installed it.  My only problem is that when I sudo with my user, I don't have direct access to commands like
> > 
> > ifconfig
> > dhcpcd
> 
> 
> I believe that like  doing an su (as opposed to su - ) it's going to
> leave you in your usual path--therefore, certain things kept in /sbin or
> /usr/sbin won't be available unless you specify the complete path, like
> /sbin/ifconfig.  This is probably what's going on with other commands as
> well.
> 
> HTH
> 
> 
> > 
> > 
> 
> -- 
> 
> Scott
> 
> PGP keyID EB3467D6
> ( 1B48 077D 66F6 9DB0 FDC2  A409 FA54 D575 EB34 67D6 )
> gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
> 
> Xander: Yeah, I'm gonna have to go with dead boy on this one. 
> Angel: Could you not call me that? 
> 


-- 

Sincerely,

Mark A Basil
Senior Support Team

Alabanza Corporation
10 East Baltimore Street
Suite 1500
Baltimore, MD. 21202
[email protected]
http://www.alabanza.com
Phone: 410.779.1400
Fax:   410.385.2237

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9kjoVAOG7Mot5glgRAh0gAKC2bgj+Sn8FX9FpodlqCQzeuDf6ogCeJzgG
DoxKM6GoY2018LXJvesUyg8=
=I3V0
-----END PGP SIGNATURE-----
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9lhaMAOG7Mot5glgRAlTPAKCdbas0ush9VHF5vR3ezE03r/hztQCguhki
CnEAKGHbXW6EL6/ZjzRmSjc=
=SwFJ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.