LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-08-2009, 04:38 AM   #1
mikidouglas
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Rep: Reputation: 0
$PATH problem


i have a host( HOST1) where $PATH is

echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/home/scripts/


The path (in bold) is set from .bash_profile

Now i go to another host (HOST2) and ssh to Host1 checking the path

HOST2>> ssh root@HOST1 echo \$PATH

which shows,

/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

this path is missing one highlighted at first in bold.

Can someone put some light on this?
 
Old 05-08-2009, 04:42 AM   #2
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
I think when you when you login via ssh, it checks for .bashrc rather than .bash_profile. I usually don't face this problem since I have .bash_profile as a link to .bashrc.

you can verify this by copying your .bash_profile to .bashrc and ssh'ng to the host again.
 
Old 05-08-2009, 04:53 AM   #3
mikidouglas
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Yup That does the job!!

Thanks again!! any idea what the same file for solaris may be?
 
Old 05-08-2009, 05:07 AM   #4
Libu
Member
 
Registered: Oct 2003
Location: Chennai
Distribution: Slackware 12.1
Posts: 165

Rep: Reputation: 36
It would depend on the shell you are logging on to. For e.g. if you are using ksh it would .kshrc.

If you are in doubt, you can clear all other startup files(like .bashrc, .kshrc e.t.c) and just put a .profile in the home directory.
 
  


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
bash script path issue - how to pass a path as a string to a variable PiNPOiNT Programming 5 04-17-2009 05:48 PM
set up java_home path in /home/user/.bashrc but use path in /usr/lib/java vitalstrike82 Slackware 4 01-13-2009 11:25 PM
PATH problem tanigie Linux - Server 1 12-03-2007 05:47 PM
script to change unix path to windows path in all files csross Programming 8 04-29-2006 01:05 PM
How to Chnage Python's module search path (sys.path)? lramos85 Linux - Software 1 05-02-2004 06:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:43 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