If you look at this script you can see it runs all the files in /etc/profile.d with the suffix .sh
So you could create a file in this directory call say "userpaths.sh"
and put in it
PATH=$PATH:/add/to/path1:/add/to/path2
export PATH
This would then add "/add/to/path1" and "/add/to/path2" to the PATH environment variable
when people log in .
Regards,
Dave.
MET wrote:
Attached is a copy of my default /etc/profile file which contains all of the system wide variables/paths for all of my bash users. If someone could show me how I would add something like /usr/local/qt/doc and /usr/local/qt/include and one or two more that would be greatly appreciated. $PATH variables are a brand new thing to me.
~ Matthew
------------------------------------------------------------------------
# /etc/profile
# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}
# Path manipulation
if [ `id -u` = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi
pathmunge /usr/X11R6/bin after
unset pathmunge
# No core files by default
ulimit -S -c 0 > /dev/null 2>&1
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
HOSTNAME=`/bin/hostname`
HISTSIZE=1000
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done
unset i
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list