Results 1 to 5 of 5
When I ssh into my machine, PATH isn't set properly, but when I su to the same user it appears as it should. I'm using Sabayon (a gentoo derivative) and ...
- 05-07-2007 #1
setting PATH
When I ssh into my machine, PATH isn't set properly, but when I su to the same user it appears as it should. I'm using Sabayon (a gentoo derivative) and I was wondering how I can make sure that my PATH is set correctly when I log in via ssh?
FYI: When I ssh in, PATH is set to,When I su to the same user, PATH is set to,Code:/usr/bin:/bin:/usr/sbin:/sbin
Code:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.1:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/qt/3/bin:${NXDIR}/bin:/usr/games/binRegistered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 05-08-2007 #2
The complete PATH (the latter example you posted) appears to have a bunch of non-standard paths in it. Where are you setting that?
If you're not sure, you can probably find out using something like
Code:$ grep -R 'blackdown-jdk-1.4.2.03' /home/your_account
- 05-08-2007 #3
Thanks anomie.
The blackdown-jdk reference is some linux java thing, while the NXDIR folder is for fast, secure, X11 connections.
This is a fresh (2 days old) installation of Sabayon linux, so my first post shows the default path.
To fix the problem I originally posted about I created a .bashrc containing source /etc/profile, but I'd still like to understand why I didn't get a full path with ssh?Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 05-08-2007 #4
Based on your response, I'm thinking the answer to my question is that that complete PATH is set by /etc/profile then?
If so, it's really strange. sshd does offer an AcceptEnv directive (which requires a SendEnv directive on the client side). I suppose it's possible you're passing in your PATH from the client..?
What makes it extra strange is /usr/sbin:/sbin would usually only be in root's PATH.
Nothing else obvious comes to mind.
- 05-08-2007 #5
I think so.
I use the following command to find out the PATH I get with ssh,So I'm not setting it at the client side. Of course, now that command gives the "right" path since I made the .bashrc.Code:ssh me@mycomputer "printenv PATH"
This is pretty strange. I'd love to understand what's going on.
Thanks for your input anomie.Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode


Reply With Quote
