Hello. I've been learning Redhat for a few months now. I recently
tried to upgrade from 7.2 to 9.0 but ended up having to reinstall
instead. So now I'm trying to get back to where I was, and add a new
user, martin. I had been the only user, so I've been both root and
ashleigh. I can't recall what it was before moving up to 9, but now my
$PATH (default from the installation I guess - I haven't changed it) is:
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/ashleigh/bin
As root, I've created a new user both using the gnome graphical
config-users tool and at the command line with useradd. No matter what
I do the new user ends up with the same path that includes one of my
directories:
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/ashleigh/bin
Both users' .bash_profile looks like:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
The /etc/profile looks like:
# /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
I've have been reading documentation online and help archives all day
and can only figure out how to add directories to my path with export, I
can't figure out the proper way to edit the /etc/profile or the
.bash_profile to fix this problem. All the examples shown look very
different from my /etc/profile - what is PATH=$PATH:$1 else
PATH=$1:$PATH?
I'd really appreciate some clarification on this when someone has a
chance.
Thanks very much,
ashleigh
--
****************************
Ashleigh B. Smythe
Graduate Research Assistant
Department of Nematology
University of California,
Davis, CA 95616
email:[EMAIL PROTECTED]
phone:530-754-4321
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list