1840000 Members
3209 Online
110158 Solutions
New Discussion

Enviroment variables bad

 
SOLVED
Go to solution
Jimmy_13
Advisor

Enviroment variables bad

What are the files that setting the enviroment variables?

In the begin of the PATH variable there is a path: "/opt/cobol/bin" that i need eliminate.

In the .profile and /etc/profile files there isn`t this setting "/opt/cobol/bin"

When i set in the .profile the new path: PATH=$PATH:/opt/lib/cobol/bin,
the old path is before the new path. Whe execute an command firts use the "/opt/cobol/bin"

I need eliminate the old path, but i don??t find where is setting.

6 REPLIES 6
Michael Tully
Honored Contributor
Solution

Re: Enviroment variables bad

Have a look in /etc/PATH
This will only take affect from new sessions, not existing ones. You will either need to log out or, fix your path manually.
Anyone for a Mutiny ?
Uday_S_Ankolekar
Honored Contributor

Re: Enviroment variables bad

Check /etc/PATH


-USA..
Good Luck..
A. Clay Stephenson
Acclaimed Contributor

Re: Enviroment variables bad

Check /etc/PATH but that could be in turn overrideen by /etc/profile or the users .profile. Also check that .profile does not source other scripts which could set the PATH.
If it ain't broke, I can fix that.
Leif Halvarsson_2
Honored Contributor

Re: Enviroment variables bad

Hi,
Are uou using CDE ? Check the file $HOME/.dtprofile .
Is ENV set (echo $ENV) ?
check the file in that variable (if there is any).
Shannon Petry
Honored Contributor

Re: Enviroment variables bad

Depending on your shell, environment variables can be in only 1 of 5 places.

Now this being said, a system can be modified in such a way that PATH is exported in more ways than this, but... lets hope the system was not modified as it will not be easy to find.

Here is the possible locations on a default system.

/etc/PATH
$HOME/.login
$HOME/.profile
$HOME/.cshrc
$HOME/.dtlogin

C-Shell is the only shell that will read the .login and .cshrc files. However, it is worth noting that C-Shell is launched in such a way that the standard sh login files are read and translated to itself. Hence Modifications to .profile will impact a C-Shell session, just as a POSIX/Borne/Korn shell.

Hope it helps!
Shannon
Microsoft. When do you want a virus today?
Jimmy_13
Advisor

Re: Enviroment variables bad

Thanks, the /etc/PATH is the file.