The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 12-02-2005
blowtorch's Avatar
blowtorch blowtorch is offline
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,323
There is a file in /etc called profile, which is executed for every user that logs in. From the man page of profile:
Quote:
profile(4) profile(4)

NAME
profile - set up user's environment at login time

DESCRIPTION
If the file /etc/profile exists, it is executed by the shell for every user who logs in. The file /etc/profile should be set up to do only those things that are desirable for every user on the system, or to set reasonable defaults. If a user's login (home) directory contains a file named .profile, that file is executed (via the shell's exec .profile) before the session begins. .profile files are useful for setting various environment parameters, setting terminal modes, or overriding some or all of the results of executing /etc/profile.
So you can set your variables in the /etc/profile, but they will be overridden if the user sets the same variables to some different value in his/her own .profile.
Reply With Quote