Project

General

Profile

Bug #4234

PATH=/usr/gnu/bin:$PATH breaks things

Added by Gordon Ross about 7 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2013-10-18
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

See also:
https://defect.opensolaris.org/bz/show_bug.cgi?id=576

David Comay <> changed:

What    |Removed                     |Added
----------------------------------------------------------------------------
Resolution|FIXED |TRACKEDINBUGSTER
Status Whiteboard| |BugsterCR=7019347

--- Comment #6 from David Comay <> 2013-01-31 05:08:51 UTC ---
Actually a bit more precisely, this was fixed via 7019347 in snv_164.

#1

Updated by Gordon Ross about 7 years ago

We've lived with this annoyance long enough. The fix is easy. See
usr/src/cmd/nsadmin/dot-profile.sh
and take out /usr/gnu/bin (or move it to the end).
[Any other places one must touch?]

The surrounding discussion, however, might not be as easy...

#2

Updated by Gordon Ross about 7 years ago

There was also a suggestion that we simply remove these files. That's an interesting solution that avoids potential arguments.

In theory, /usr/bin/login should give you a usable PATH even without any of those .profile overrides, etc. It does (you get a path with just /usr/bin) though one might want to add links to /usr/bin for a few commands that normal users may reasonably expect to be able to run: ping, zfs, ...

As for PAGER, the default built into man looks fine (it's "less -ins").
Leaving PS1 to the shell default should be fine too.

In summary, none of those .profile settings are really needed.
We could just remove them. (and leave that to distros)

#3

Updated by Lauri Tirkkonen over 6 years ago

Gordon Ross wrote:

In theory, /usr/bin/login should give you a usable PATH even without any of those .profile overrides, etc. It does (you get a path with just /usr/bin)

The default is '/usr/bin:' which includes cwd, but yeah. This is also configurable via /etc/default/login (usr/src/cmd/su/su.dfl I guess).

In summary, none of those .profile settings are really needed.
We could just remove them. (and leave that to distros)

I agree. There are too many defaults here: /etc/default/login (/usr/bin/login sets PATH), /etc/profile (although this one doesn't set PATH as shipped), and ~user/.profile (which is what is highlighted here).

(This is made somewhat more annoying by the fact that /root/.profile is shipped and overrides SUPATH from /etc/default/login, making that setting useless unless the local admin removes /root/.profile)

Also available in: Atom PDF