Solved

update system wide env

Posted on 2002-05-15
9
214 Views
Last Modified: 2013-12-15
here is my problem.
I need to update system wide Path, and some other enviroment variables.
I added the new enviroment variable to /etc/profile and csh.login
restarted system, and NOthing happend?
now if I add them to /etc/csh.cshrc and /etc/bashrc they work and users can see new application path and applications Are aware of their specific enviroment, but that is NOT where it is suppose to go.
what is wrong with /etc/profile and /etc/csh.login?
0
Comment
Question by:ragaMuffin
  • 4
  • 3
  • 2
9 Comments
 
LVL 2

Accepted Solution

by:
wqclatre earned 100 total points
ID: 7011088
Check that you don't set a new path from scratch in your files in your homedir. ($HOME/.bashrc $HOME/.bash_profile $HOME/.login etc....)  
0
 

Author Comment

by:ragaMuffin
ID: 7011466
I'm Not.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7012029
> .. but that is NOT where it is suppose to go ..
PLease read man-pages, carefully. Then read them again, and again, ..

ash, ksh, pdksh, sh (and many more): /etc/profile
zsh: /etc/zshenv
csh, tcsh: /etc/csh.cshrc
bash: /etc/profile, or read man-page and ask the person who compiled and installed it

anything in $HOME (wherever this is), is useless for your purpose.
/etc/csh.login and /etc/bash_login are for special purpose (login shell only, usually).
/etc/bashrc depends on bash (compilation, version etc.)
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 51

Expert Comment

by:ahoffmann
ID: 7012032
BTW, "restarted the system" you don't need that, it's UNIX ;-)
0
 

Author Comment

by:ragaMuffin
ID: 7012229
wqclatre,
You get the points because what's his face attitude SUCKS
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7012287
ragaMuffin,
not shure if you mean me, respectively my comment, when you write "SUCKS".
But please explain why you graded a comment which is incorrect according your initial question: "update system wide Path".
Or did I missunderstand your question?
0
 
LVL 2

Expert Comment

by:wqclatre
ID: 7012351
Why do you give me the points. I don't desever them so please some administrator take them away.
0
 

Author Comment

by:ragaMuffin
ID: 7012378
You were too busy being sarcastic that “he who know passes the knowledge to those who don’t with humbleness “
NOW, I know how to read the man pages, but the problem is, Go take a look at /etc/profile and /etc/bashrc.  At top of BOTH files, you will see “System wide environment and startup programs functions and aliases go in “ and then each one will POINT to the other.
Now on Solaris, still UNIX, /etc/profile will tell you “ the profile that all logins get before using their own .profile”
On IRIX /etc/profile states “default settings for all sh users”
On SGI Indigo /etc/profile states “this script is executed before $HOME/.profile when an sh user logs in or invokes /bin/su/ with the ‘-‘ option.

So you can see my sarcastic Helper that I know what Unix is and Know what /etc/profiles does according to UNIX.  What I needed help with was Linux, because the same thing that works for UNIX did not work for Linux.

I don’t appreciate your sarcasm, and never will.  I gave points to the other individual and made the decision to research this issue on my own rather than depending or getting an answer from some arrogant person such as yourself.
I would really appreciate it if you NEVER try to help me again.  Any time you see me asking a question, just look the way, Mr. Unix.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7012436
hmm, wasn't meant as an offence in either comment. Sorry.

So we look at your initial question, and the previous comment, then read my first suggestion, and you'll see that you didn't read the man-page but the files.
You probably didn't read carefully enough. That was my message. And I kindly please you to do, it's exactly as I described in my first comment for sh (AT&T sh, not bash, therfore see below).
This applies to any UNIX I've ever seen, even IRIX. If it doesn't, then they use a proprietary shell (like on HP-UX).
(ANd if it is not, please tell me: I'm interested)

bash is not sh, unfortunatelly.
And its behaviour, particular the behaviour when reading startup files, depends on the configuration at compile time too. That's the main reason why I recommended to read the man-page. bash may be strange here, and you may have to beat other people's dragons.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

827 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question