[491] in NetBSD-Development

home help back first fref pref prev next nref lref last post

Re: The default PATH for NetBSD

daemon@ATHENA.MIT.EDU (John Hawkinson)
Fri Jan 27 14:11:40 1995

Date: Fri, 27 Jan 1995 14:10:49 -0500
To: Greg Hudson <ghudson@MIT.EDU>
Cc: netbsd-dev@MIT.EDU
In-Reply-To: "[486] in NetBSD-Development"
From: John Hawkinson <jhawk@MIT.EDU>


> I wrote in an RCS log:
> } Set the default path for NetBSD.  Two notes: /srvd/patch definitely needs
> } to be in the path, and /sbin and /usr/sbin are not there.  If users wish
> } to add /sbin and /usr/sbin to their paths, they can, but it doesn't belong
> } there by default.
>  
> Note that I wasn't thinking too carefully about /srvd/patch here; we
> don't have an /srvd, so that was silly of me.  I corrected this in a
> later RCS log entry which John didn't include.

Sorry, I was referring to your reasoning about /sbin and /usr/sbin, and
disregarding the rest. [Incidentally, it's not clear to me that we ought
not have a /srvd/patch, but...]

me:
> > I disagree with this. I think that /sbin and /usr/sbin _do_ belong
> > in user's PATHS. This is more of a pragmatic opinion rather than a
> > philosophical one, but there are programs in those directories that
> > users ought to be able to run without dotfile hacking, thus I think
> > they should be in the PATH.


> In other words, you either (a) disagree with the distinction between
> /bin and /sbin, and think all of those files should be in the same
> directory, or you (b) think that binaries should be separated into
> different directories for no reason except to make people's paths
> longer.

Nope! I think it's unreasonable for you to try and make these claims,
and neither of them make sense. :-)

> I think ping and traceroute and mount and fdisk should be in users'
> paths, because they might run them.  I think those binaries should be
> in /bin or /usr/bin.  Unfortunately, I wasn't one of the designers of
> the BSD 4.4 hier, and I'm not going to protest their decisions by
> completely ignoring their design.

Recall that hier(7) states:

/usr/bin:	common utilities, programming tools, and applications
/usr/sbin:	system daemons & system utilities (executed by users)
                                                   ^^^^^^^^^^^^^^^^^
I think that maintaining "system utilities" in a different directory
from "common [user] utilities" is a good idea, both for source tree
arrangement and for binary placement. I don't think that this was
designed to keep the sbins out people's PATHs.


The non /usr versions don't have the same exact text:
     /bin/    user utilities fundamental to both single-user and multi-user
              environments

     /sbin/   system programs and administration utilities fundamental to both
              single-user and multi-user environments

But it's similar. I fail to see why users should not be able to execute
"system programs" by default.

> Again, if individual users think the design is broken and want to add
> /sbin and /usr/sbin to their paths (thus getting programs like
> ldconfig, modload, and restore in their paths which they'll never run,
> that's fine, but we shouldn't do it for them.

You're not providing a good reason, here...

> Note that the default NetBSD /usr/bin/login sets a path of
> "/usr/bin:/bin".

This is irrelevant, and meant to be overriden. I call your
attention to the default NetBSD .profile (/.profile) which has:

PATH=/sbin:/usr/sbin:/bin:/usr/bin:.

Similarly, the default .cshrc has:

set path=(/sbin /usr/sbin /bin /usr/bin .)

[So there.]

--jhawk

home help back first fref pref prev next nref lref last post