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 > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-04-2010, 11:00 PM
suvayu ali
 
Default No /sbin PATH after sudo in Fedora 12 even after the PATH is added in .bash_profile

On 4 February 2010 15:13, Richard R. Cahilig <r.cahilig@gmail.com> wrote:
> Hello,
>
> I have a problem with my fedora 12 box. There is no /sbin and /usr/sbin PATH
> after using sudo. This is the output if I run the command echo $PATH.
> /usr/kerberos/sbin:/usr/kerberos/bin:/usr/bin:/bin
>
> I tried to add the /sbin and /usr/sbin PATH in .bash_profile but I still have
> the same problem.
>
> If I use the command su, and if I run the command echo $PATH, the /sbin and
> the /usr/sbin is there.
> /usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/richard/bin
>
> I need to use sudo instead of su for security reasons and I don't want to type
> the whole /sbin PATH if I will run some command from this /sbin. I don't know
> what is the problem I'm having in my fedora 12 box, please advise. Looking
> forward to your help. Sorry for my English.

As far as I understand this, sudo still uses your (the regular user's)
$PATH. Try setting $PATH in .bash_profile, logout and login again. The
logout and login is important. Technically you can just source your
.bash_profile and start working, but if you logout and login then you
know for sure whether this works for your subsequent sessions.

Hopefully this was helpful. Good Luck

--
Suvayu

Open source is the future. It sets us free.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
 
Old 02-04-2010, 11:13 PM
Tom Horsley
 
Default No /sbin PATH after sudo in Fedora 12 even after the PATH is added in .bash_profile

On Thu, 4 Feb 2010 16:00:39 -0800
suvayu ali wrote:

> As far as I understand this, sudo still uses your (the regular user's)
> $PATH.

Nope, that's merely what the docs claim. In fact, the security geeks
decided sudo absolutely needed to have a hard coded PATH and as far
as I know the only way to fix that is to rebuild it from source. It
has been like this for a while now.

https://bugzilla.redhat.com/show_bug.cgi?id=475990

Maybe you could create an alias that runs sudo env PATH=$PATH "$@"
or something to sneak the path back into the sudo'ed command...
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
 

Thread Tools




All times are GMT. The time now is 12:34 AM.

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