Bug #4234
openPATH=/usr/gnu/bin:$PATH breaks things
0%
Description
See also:
https://defect.opensolaris.org/bz/show_bug.cgi?id=576
David Comay <david.comay@oracle.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |TRACKEDINBUGSTER
Status Whiteboard| |BugsterCR=7019347
--- Comment #6 from David Comay <david.comay@oracle.com> 2013-01-31 05:08:51 UTC ---
Actually a bit more precisely, this was fixed via 7019347 in snv_164.
Updated by Gordon Ross almost 10 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...
Updated by Gordon Ross almost 10 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)
Updated by Lauri Tirkkonen about 9 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)