[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/profile should include sbin in PATH

On Sun, Dec 19, 1999 at 10:39:51PM -0600, Steve Greenland wrote:
> On 19-Dec-99, 21:45 (CST), Craig Sanders <cas@taz.net.au> wrote: 
> > of course, if it bothered you then you could edit /etc/profile and
> > remove the unwanted directories from $PATH.
> Of course, if the lack of /sbin in your path bothers you, you could
> edit /etc/profile and add the wanted directories to $PATH.

as i've already said, that is exactly what i do now. it is trivial to do
and vastly preferable to having to create multiple symlinks if various
binaries are moved from /sbin to /bin or /usr/sbin to /usr/bin...and
infinitely better than suddenly finding that scripts which had been
working perfectly for years have suddenly stopped working after the
latest upgrade.

> Okay, now that I have that out of my system, it seems to me that given
> the heat of the arguments and lack of consensus, we probably ought not
> change /etc/profile.

we should either change /etc/profile or leave things exactly as they
are. i don't care much either way, but i do object to the proposal to
move binaries from sbin to bin.

> We probably ought to move traceroute and few others to /usr/bin,


that kind of surprise change WILL break a lot of custom scripts
written by system admins around the world. debian systems should not
gratuitously break after an upgrade, and a minor one-time inconvenience
hardly qualifies as good cause for making such a major change.

if any change is to be made, then the sbin directories should be added
to the default PATH. at least that achieves the desired aim without
causing a PITA for existing installations.

> as they do provide useful info to non-admin users. But I think for
> things like ifconfig, which is *primarily* of use to the admin, and
> probably has a hard-coded path in some scripts,

/sbin and /usr/sbin are not in the default PATH so most of the tools in
those directories will have been called with hard-coded paths in scripts
- e.g. traceroute CGI scripts. probably everyone here has run into the
problem where scripts work in certain contexts (e.g. when logged in as
root) but not in other contexts (e.g. from cron or from sudo or from an
"su" shell rather than "su -"), and i'll bet everyone has come up with
the same workaround: to hard-cod the pathnames into scripts so that they
work in all contexts.

major changes like this which have the potential for causing a great
deal of hassle for debian sysadmins should not be made lightly.

> it's not that big of a deal for "normal" users to either enhance their
> PATH (if they use it a lot) or just type /sbin/ifconfig occasionally.

exactly right. it's not a big deal to do either of those things.


craig sanders

Reply to: