On Wed, Aug 08, 2007 at 06:09:16AM -0700, pixotec wrote: > I want to set the environment variables > > PATH=$PATH:/usr/local/jdk-1.5.0/bin > JAVA_HOME=/usr/local/jdk-1.5.0 > > globally. > > for one user I can change therefor .profile like this: > PATH=/usr/local/jdk-1.5.0/bin:/bin:... > ... > export PATH HOME TERM > > but I want it for all users: > 1. could change all .profile-files of all users: no thanx ;-( (and change > /etc/skel/.profile for future new users) > 2. change /etc/login.conf ??? > 3. create /etc/profile, change all existing .profile of users (to source > /etc/profile) and change /etc/skel/.profile
Do you really need to source /etc/profile for login shell or is it automatically sourced? I didn't try it, but sh(1) says: -l Login shell. If the basename the shell is called with (i.e. argv[0]) starts with `-' or if this option is used, the shell is assumed to be a login shell and the shell reads and executes the contents of /etc/profile and $HOME/.profile if they exist and are readable. > 4. change /etc/ksh.kshrc and create .kshrc sourcing /etc/ksh.kshrc for all > users (and in /etc/skel...) > > IS THERE A EASY WAY (change only on central file for all users) TO SET THEM? Regards, Markus