Bug 19968 - /etc/profile can put /usr/X11R6/bin in path twice
/etc/profile can put /usr/X11R6/bin in path twice
Product: Red Hat Linux
Classification: Retired
Component: setup (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2000-10-28 17:43 EDT by Jeff Norden
Modified: 2014-03-16 22:17 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-10-28 17:43:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeff Norden 2000-10-28 17:43:51 EDT
/etc/profile has the line:


which unconditionally changes the path.  This is correct behavior if bash
is spawned directly by /bin/login, but in other situations it can put
/usr/X11R6/bin into the path twice. 

This happens is with an ssh login, since ssh doesn't use /bin/login unless
the UseLogin option is selected.  Another way to reproduce the problem is
to use 'su - foo' to change to the user foo.  The best fix, imho, is to
have /etc/profile do a check before modifying the path.  Here is one of
many ways this can be done (not the shortest way, but at least its not too

echo $PATH | /bin/grep --silent /usr/X11R6/bin
if [ $? -ne 0 ]; then
Comment 1 Bill Nottingham 2001-01-29 13:38:21 EST
will be fixed in setup-2.3.7-1; thanks!

Note You need to log in before you can comment on or make changes to this bug.