NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Create a file with history in sh
On Wed, Jun 18, 2014 at 2:14 PM, Rocky Hotas <rockyhotas%post.com@localhost>
wrote:
>> Sent: Wednesday, June 18, 2014 at 2:51 PM
>> From: "Greg Troxel" <gdt%ir.bbn.com@localhost>
>> To: "Rocky Hotas" <rockyhotas%post.com@localhost>
>> Cc: netbsd-users%netbsd.org@localhost
>> Subject: Re: Create a file with history in sh
>>
>>
>> I've redirected followups to netbsd-users. tech-userlevel is for
>> arguing about complicated bugs or proposed changes ;-)
>
> Ok :) and sorry for the mistake.
>
>> I suggest keeping root
>> as /bin/sh for avoiding problems, but best practice is to use the actual
>> root account sparingly anyway. (sudo -E will give you a uid 0 version
>> of your own shell, sourcing dotfiles.)
>> /bin/sh in NetBSD is intentionally minimalist:
>
> Thank you for your advices. If this is the right place (or tell me if it is
> better to continue this discussion privately), I would have three questions:
>
> - why /bin/sh is intentionally minimalist? Which are its main purposes?
It is mainly a standards compliant shell for running shell scripts,
not primarily as an interactive shell, and as a minimal interactive
shell if the system is in a minimal state (eg in the installer, or if
something fails), or on very small systems. NetBSD tries to have a
minimal install that is very small that you then build on.
> - why do you suggest /bin/sh as default shell for root?
It is always going to be there as it is part of the base system. bash
(say) might not be, say if you mess up pkgsrc and break it, then you
need /bin/sh to recover the situation as root.
> - do you suggest to seldom use the root account in order to prevent some
> system damages, like in the other *nix systems, or for other reasons?
Yes, it is just the principle of least privilege, only use root when
you need to.
Justin
Home |
Main Index |
Thread Index |
Old Index