Hi Ashleigh:
How are you testing the new user? Are logging from a console/terminal
session or are you using su? If the later are you using "su martin"
or "su - martin"? If the former then that would explain it. "su"
without the dash retains your environment. Use "su -" to get the
target user's environment (including path). This goes for root as
well.
HTH
Regards, Hugh
--
Hugh E Cruickshank, Forward Software, www.forward-software.com
From: ashleigh smythe Sent: Wednesday, July 09, 2003 17:46
>
> 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
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.498 / Virus Database: 297 - Release Date: 03/07/08
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list