|
|
#1 |
|
Triple-A Player
Join Date: Apr 2003
Posts: 66
|
setting the path
Hi,
I have a package installed in my Desktop folder. However the commands in the package have to be specified as ./command. Which probably means that I need to add the package to the PATH name. How do I about changing the pathname and more importantly in which file do I change the pathname? Tried changing the csh.login but wasnot allowed to. Will appreciate any input. Thanks. Anjan
__________________
ANJAN PURKAYASTHA |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jan 2002
Posts: 10,677
|
Rather than adding your Desktop Folder to your path, you might want to consider putting this "package" someplace more approriate for a UNIX file system.. someplace like /usr/local/bin/. Of course, then you have do add that to your path. I use a .login (stored in your home directory, it is invoked each time you open a new shell) to change my path. Just coppy /etc/csh.login to your home directory and call it .login. Here is my .login:
Code:
setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/sw/bin:/sw/sbin:/usr/X11R6/bin" |
|
|
|
|
|
#3 |
|
Triple-A Player
Join Date: Apr 2003
Posts: 66
|
Thanks yellow , that worked fine. My question. Now the computer has two .login files : one in /etc dir and one in my home directory. Will that screw things up?
Anjan
__________________
ANJAN PURKAYASTHA |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jan 2002
Posts: 10,677
|
Nope.. by default it'll look at your home directory first and ignore anything else. If nothing exists there, it goes to the global .login in /etc
|
|
|
|
|
|
#5 |
|
Triple-A Player
Join Date: Apr 2003
Posts: 66
|
thank you once again.
__________________
ANJAN PURKAYASTHA |
|
|
|
|
|
#6 |
|
Major Leaguer
Join Date: Jan 2003
Location: Portland, OR
Posts: 288
|
You can also add . to your path which basically allows you to run things that are in your current working directory.
example: if you had to do this before.... ./someScript.sh you can simply do somScript.sh after you add . to your path. |
|
|
|
|
|
#7 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
a dot in the path is ill-advised; a known security exploitation.
explicit directories in the path, please.
__________________
On a clear disk, you can seek forever. |
|
|
|
|
|
#8 |
|
Major Leaguer
Join Date: Jan 2003
Location: Portland, OR
Posts: 288
|
Merv,
Can you elaborate? First I've heard of adding . being a security risk. |
|
|
|
|
|
#9 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
trojan horse
see sidebar "Stealing Superuser" in section "4.3.5 Using su with Caution":
http://www.soldierx.com/books/networ...is/ch04_03.htm 4.3.5 references chapter 11, and in the book here, "PATH attacks" (missing from the online version) urges all accounts to be wary of this PATH exploit by not having empty (::) or current dir (:.:) in the path.
__________________
On a clear disk, you can seek forever. |
|
|
|
|
|
#10 |
|
Major Leaguer
Join Date: Jan 2003
Location: Portland, OR
Posts: 288
|
Cool. Thanks!
|
|
|
|
![]() |
|
|