LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-28-2010, 05:23 PM   #1
andrewbonney
LQ Newbie
 
Registered: May 2010
Posts: 2

Rep: Reputation: 0
Sudo path variable error


Hi,
I'm having a strange issue with the PATH variable when running the command 'sudo su'. When executing this command the PATH variable changes. No problems there, but it changes to:

Code:
/usr/kerberos/sbin:/usr/kerberos/bin://sbin://bin:/usr/bin:/bin
Looking at this, there are two weird entries (//sbin and //bin) which should both start '/usr' instead. I'm not sure how I've managed to change this, or how a piece of software I'm using has done it (more likely it was me I expect), but could anyone suggest which file to look in to correct it? If it makes a difference the machine is running CentOS 5.

Cheers,
Andrew
 
Old 05-28-2010, 09:29 PM   #2
mac.tieu
Member
 
Registered: Jan 2010
Location: Vietnam
Distribution: Arch
Posts: 65

Rep: Reputation: 22
Quote:
Originally Posted by andrewbonney View Post
Hi,
I'm having a strange issue with the PATH variable when running the command 'sudo su'. When executing this command the PATH variable changes. No problems there, but it changes to:

Code:
/usr/kerberos/sbin:/usr/kerberos/bin://sbin://bin:/usr/bin:/bin
Looking at this, there are two weird entries (//sbin and //bin) which should both start '/usr' instead. I'm not sure how I've managed to change this, or how a piece of software I'm using has done it (more likely it was me I expect), but could anyone suggest which file to look in to correct it? If it makes a difference the machine is running CentOS 5.

Cheers,
Andrew
Try out 'sudo su -' which reset all environment variables for su session.

MT.
 
Old 05-29-2010, 03:07 AM   #3
andrewbonney
LQ Newbie
 
Registered: May 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Yes, that works, but it only seems to hold for the current session. Is there any way to make it more permanent?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PATH, dot dir, and sudo yogaboy2 Linux - General 5 07-06-2009 08:14 PM
Add path to $PATH variable alaios SUSE / openSUSE 2 04-19-2009 08:41 AM
bash script path issue - how to pass a path as a string to a variable PiNPOiNT Programming 5 04-17-2009 05:48 PM
Can a sudo user be allowed use relative path yksudha Linux - Security 1 06-11-2008 01:02 AM
the path variable mjkramer Linux - Newbie 4 10-18-2003 07:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration