LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-17-2003, 11:23 PM   #1
-G-
LQ Newbie
 
Registered: Mar 2003
Location: North West USA
Distribution: Redhat 8.0 & 9.0, Mandrake 9.0 & 9.2, Fedora Core 1, Knoppix
Posts: 28

Rep: Reputation: 15
RedHat 9.0 and $PATH - where are the directories?


I have upgraded from RedHat 8.0 to RedHat 9.0. I was installing MySQL and ran a command "ldconfig". I was given the "yo, ain't in your PATH man" error message I love so much.

So, after I type

echo $PATH

I get back

/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/steve/bin

Seems odd to me that /sbin and /etc/sbin aren't there.

So i dig...and dig... and look at my .cshrc file in the /root directory

setenv PATH "/usr/local/sbin:/usr/sbin:/sbin:${PATH}:${HOME}/bin"

First, why the discrepencies between teh .cshrc file and the actual $PATH? Also, if I've su'd to root and type echo $PATH, why does it still use /home/steve/bin?

wanted to add that i boot to text, and log in as steve. I then su to root. I notice that when the machine boots, and i log in as root (as opposed to su'ing to root) i get the full path i was expecting. So why doesn't the root's path follow when I su to root?

-G-

Last edited by -G-; 11-17-2003 at 11:35 PM.
 
Old 11-17-2003, 11:54 PM   #2
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
When you su to root, you have to
su -
not just
su
the '-' tells su to load roots environment. Without it, you become root but keep 'steve's' environment.

I am surprised that you aren't running bash (I suspect you are). If you open, as root
redhat-config-users
and select a user and properties, what does the login shell show? The default is bash, so that would explain the path inconsistancy because .cshrc is not used.

FYI. /sbin and /usr/sbin are usually NOT in a normal users path.

So, if you are running bash, what you posted is exactly the way it is supposed to work.

RO
 
Old 11-18-2003, 12:18 AM   #3
-G-
LQ Newbie
 
Registered: Mar 2003
Location: North West USA
Distribution: Redhat 8.0 & 9.0, Mandrake 9.0 & 9.2, Fedora Core 1, Knoppix
Posts: 28

Original Poster
Rep: Reputation: 15
BAH!

Once again I am reminded how much I have to learn, and how little I know.

Your lack of disdain for my ignorance is a testament to your acumen.

Thank you.

On a side not, I'm guessing I should have been looking at the .bashrc file, not the .chsrc file...?

-G-
 
Old 11-18-2003, 06:21 AM   #4
8nasmith
Member
 
Registered: Oct 2003
Location: Cornwall, UK
Distribution: Fedora Core 4
Posts: 268

Rep: Reputation: 30
redhat to windows

did you know that redhat annonced that peole using it at home should switch back to windows. Unbeliveable.
 
Old 11-18-2003, 08:14 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Re: redhat to windows

Quote:
Originally posted by 8nasmith
did you know that redhat annonced that peole using it at home should switch back to windows. Unbeliveable.
I'm sure he knows but how is this suppose to help him with his question? Useless post. If you don't post an actual answer or contribute to the thread, don't post at all. Post constructively like our rules state.
 
Old 11-18-2003, 09:19 AM   #6
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
Quote:
Originally posted by -G-
BAH!

Once again I am reminded how much I have to learn, and how little I know.

Your lack of disdain for my ignorance is a testament to your acumen.

Thank you.

On a side not, I'm guessing I should have been looking at the .bashrc file, not the .chsrc file...?

-G-
Yes, .bashrc, .bash_profile and the primary setup file is /etc/bash. All 3 get run. If you want to add to a 'users' path specifically, append to .bashrc in their home dir (ALWAYS backup first), and if you want system wide path change for any user, append to /etc/bash (ALWAYS backup first).

FYI: Nothing you posted are things that you should worry about. Until you know, the '-' and how to know which shell you run are things that aren't really intuitive.

RO
 
Old 11-18-2003, 06:02 PM   #7
-G-
LQ Newbie
 
Registered: Mar 2003
Location: North West USA
Distribution: Redhat 8.0 & 9.0, Mandrake 9.0 & 9.2, Fedora Core 1, Knoppix
Posts: 28

Original Poster
Rep: Reputation: 15
well at least 8nasmith is wasting his time here flaming me rather than running around defacing some one's web site being a good little skript kiddie

anyway, thanks for info. sure explained a ton in a short amount of space.

-G-
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't compile in directories not in PATH tutwabee Linux - Software 5 09-27-2004 09:37 PM
script to check $PATH directories exist Frustin Linux - Software 3 09-21-2004 12:20 PM
Adding directories to the PATH statement kaplan71 Slackware 2 09-02-2004 03:57 PM
problems linking programs directories in my path jimdaworm Linux - Newbie 9 04-14-2004 03:27 PM
directories visibility problem in redhat 9 lomaree Linux - Software 3 04-13-2004 12:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:24 AM.

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