First of all, RH5.0, as distributed and updated, doesn't include "." in any
user's PATH by default, even if you load "everything". This means that, if
all users get this, either somebody has changed one of the global
initialization files or some installed program has taken 'improper'
liberties with the PATH setup.
Since you mentione /etc/skel/.bash_profile, I assume that the users are all
using bash, so we don't have to deal with all the other shell possibilities.
There are two approaches:
1. You can find and fix where the "." is being inserted into the path.
First check /etc/profile:
If it hasn't been changed, it probably just ads /usr/X11R6/bin
to the path
Then check /etc/profile.d/*.sh. All these files get invoked from
/etc/profile and may be the culprits. It's conceivable that
something you installed after loading RH5.0 added a <something>.sh
here that adds "." to PATH.
Then check /etc/bashrc. There shouldn't be any PATH settings here,
but check anyhow.
Initially the users' ~/.bashrc and ~/.bash_profile should be just
copies of /etc/skel/{.bashrc,.bash_profile}. Check that such is
the case and that they aren't responsible for the PATH setting.
Also check for ~/.bash_login and/or ~/.profile.
You can narrow down *WHERE* the problem is by temporarily modifying
/etc/profile, for instance to put
echo "start.etc.profile: $PATH"
at the beginning of /etc/profile, and
echo "end.etc.profile: $PATH"
at the end of /etc/profile. If "." isn't in the first and is in
the second, that narrows down the possibilities. Similarly with
some of the other init files if this doesn't narrow it down.
If you don't find the culprit in any of these, you may have to resort
to the ugly solution of fixing it AFTER the fact.
2. You can *REMOVE* "." from the PATH *AFTER* the fact, f'rinstance:
export PATH=`echo $PATH | sed -e 's/^\.://' -e 's/:\.$//' -e 's/:\.:/:/'`
For your particular case, you'd only need the last of the three
regexps: the other two deal with "." at the beginning or end of the
PATH, so I figured I'd give you the generic case.
I'd be interested in hearing what you discover.
pete peterson
GenRad, Inc.
7 Technology Park Drive
Westford, MA 01886-0033
[EMAIL PROTECTED] or [EMAIL PROTECTED]
+1-978-589-7478 (GenRad); +1-978-256-5829 (Home: Chelmsford, MA)
+1-978-589-2088 (Closest FAX); +1-978-589-7007 (Main GenRad FAX)
> Date: Fri, 29 May 1998 21:43:42 -0700 (PDT)
> From: Ron Golan <[EMAIL PROTECTED]>
> To: Red Hat Linux Mailing List <[EMAIL PROTECTED]>
> Subject: Re: Scripts...
> Message-ID: <Pine.LNX.3.96.980529213239.5803C-100000@ozenfant>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> While we are talking about paths, I have a question regarding default
> paths for normal users. In RH5.0 /etc/skel/.bash_profile assigns the
> following:
>
> PATH=$PATH:$HOME/bin
> ^^^^^
> this $PATH seems to be:
>
> /usr/local/bin:/bin:/usr/bin:.:/usr/X11R6/bin:/usr/bin/mh
>
> As you can see, it includes . Where can I edit this to remove it?
> --
> Ron Golan
> [EMAIL PROTECTED]
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.