Re: [HEADSUP] making /bin/sh the default shell for root

2021-10-12 Thread Gary Jennejohn
On Tue, 12 Oct 2021 14:42:48 +0200
Guido Falsi via freebsd-current  wrote:

> On 12/10/21 14:21, Gary Jennejohn wrote:
> > On Tue, 12 Oct 2021 06:59:00 -0400
> > grarpamp  wrote:
> >   
> >>> No. The system shell is supposed to make the system usable
> >>> by the users. Actually, the real problem is that the easiest way
> >>> to shoot one's own foot is by changing the language (say, the
> >>> shell) spoken by default by FreeBSD.  
> >>
> >> Well, the FreeBSD system speaks sh for its own use, this is clearly
> >> documented as the shell called by init(8), and later by rc(8),
> >> it should probably be the root:0 entry at least for consistancy.
> >> No other shell is called by the FreeBSD system there.
> >> Whatever the users want for their own shells is really up
> >> to them to decide after that.
> >>
> >> "Default" is bit of low context word, as there is no falling
> >> back to some shell occuring, no filling in for some missing
> >> option, etc. Maybe use word "shipped" or "root" instead.
> >>
> >> Everyone said they already do, and will continue to,
> >> exec whatever shell they like, whether after login,
> >> or by changing the entry. So in addition to the user
> >> being ultimately responsible for their own box and usage,
> >> this well announced entry for UPDATING cannot therein
> >> really be responsible for any user self-shooting.
> >>  
> >>> This is non-sense.  
> >>
> >> Well, FreeBSD does not add every shell in base,
> >> does not add every app to base, etc.
> >> Some reasons for those limits should be obvious.
> >> This update gives further distilling clarity by
> >> limiting the number of shipped uid 0 entries to 1,
> >> with that 1 being sh.
> >>  
> >>> Every unix user should know that it's
> >>> possible to changing the used shell by using
> >>> chsh and this includes root.  
> >>
> >> Then for every user, this update is not a problem.
> >>  
> > 
> > I've been using UNIX both privately and professionally since 1984
> > and I must admit that I never heard of chsh before seeing this
> > e-mail.  I simply use vipw; it's the logical way to do this sort
> > of thing IMHO.  But I suppose that this is the way to go for users
> > who don't have root access (which I always have).  
> 
> AFAIK only root can use vipw, while chsh is usable by all system users.
> 

Which is pretty much what I wrote above.

> Guess you've been root since 1984 :)
> 

On the systems I've had control of, always.  I started out with 4.2BSD
running on a VAX, which didn't have chpass, so csh was the default.  The
VAX was used to cross-compile AT III/IV/V to run on Motorola CPUs.

I always had full control of the target machines, although the Bourne
shell was pretty much the only shell available then.

After relocating for that employer from Berkeley to Germany I helped
administer the VAX, so I had to have root access.

Unfortunately, the german spinoff went tits up in 1989 and I decided to
stay in Germany.

And, no matter where I was employed after that, I was always able to
get root access, which I never abused.

But since 2000 I've administered my own FreeBSD machines at home as a
freelancer (but I'm now retired), so root access is always required.

-- 
Gary Jennejohn



Re: [HEADSUP] making /bin/sh the default shell for root

2021-10-12 Thread Guido Falsi via freebsd-current

On 12/10/21 14:21, Gary Jennejohn wrote:

On Tue, 12 Oct 2021 06:59:00 -0400
grarpamp  wrote:


No. The system shell is supposed to make the system usable
by the users. Actually, the real problem is that the easiest way
to shoot one's own foot is by changing the language (say, the
shell) spoken by default by FreeBSD.


Well, the FreeBSD system speaks sh for its own use, this is clearly
documented as the shell called by init(8), and later by rc(8),
it should probably be the root:0 entry at least for consistancy.
No other shell is called by the FreeBSD system there.
Whatever the users want for their own shells is really up
to them to decide after that.

"Default" is bit of low context word, as there is no falling
back to some shell occuring, no filling in for some missing
option, etc. Maybe use word "shipped" or "root" instead.

Everyone said they already do, and will continue to,
exec whatever shell they like, whether after login,
or by changing the entry. So in addition to the user
being ultimately responsible for their own box and usage,
this well announced entry for UPDATING cannot therein
really be responsible for any user self-shooting.


This is non-sense.


Well, FreeBSD does not add every shell in base,
does not add every app to base, etc.
Some reasons for those limits should be obvious.
This update gives further distilling clarity by
limiting the number of shipped uid 0 entries to 1,
with that 1 being sh.


Every unix user should know that it's
possible to changing the used shell by using
chsh and this includes root.


Then for every user, this update is not a problem.



I've been using UNIX both privately and professionally since 1984
and I must admit that I never heard of chsh before seeing this
e-mail.  I simply use vipw; it's the logical way to do this sort
of thing IMHO.  But I suppose that this is the way to go for users
who don't have root access (which I always have).


AFAIK only root can use vipw, while chsh is usable by all system users.

Guess you've been root since 1984 :)

--
Guido Falsi 



Re: [HEADSUP] making /bin/sh the default shell for root

2021-10-12 Thread Gary Jennejohn
On Tue, 12 Oct 2021 06:59:00 -0400
grarpamp  wrote:

> > No. The system shell is supposed to make the system usable
> > by the users. Actually, the real problem is that the easiest way
> > to shoot one's own foot is by changing the language (say, the
> > shell) spoken by default by FreeBSD.  
> 
> Well, the FreeBSD system speaks sh for its own use, this is clearly
> documented as the shell called by init(8), and later by rc(8),
> it should probably be the root:0 entry at least for consistancy.
> No other shell is called by the FreeBSD system there.
> Whatever the users want for their own shells is really up
> to them to decide after that.
> 
> "Default" is bit of low context word, as there is no falling
> back to some shell occuring, no filling in for some missing
> option, etc. Maybe use word "shipped" or "root" instead.
> 
> Everyone said they already do, and will continue to,
> exec whatever shell they like, whether after login,
> or by changing the entry. So in addition to the user
> being ultimately responsible for their own box and usage,
> this well announced entry for UPDATING cannot therein
> really be responsible for any user self-shooting.
> 
> > This is non-sense.  
> 
> Well, FreeBSD does not add every shell in base,
> does not add every app to base, etc.
> Some reasons for those limits should be obvious.
> This update gives further distilling clarity by
> limiting the number of shipped uid 0 entries to 1,
> with that 1 being sh.
> 
> > Every unix user should know that it's
> > possible to changing the used shell by using
> > chsh and this includes root.  
> 
> Then for every user, this update is not a problem.
> 

I've been using UNIX both privately and professionally since 1984
and I must admit that I never heard of chsh before seeing this
e-mail.  I simply use vipw; it's the logical way to do this sort
of thing IMHO.  But I suppose that this is the way to go for users
who don't have root access (which I always have).

> > BTW, toor default to sh, not tcsh.  
> 
> No one said that the toor entry does not use sh.
> 

-- 
Gary Jennejohn



Re: [HEADSUP] making /bin/sh the default shell for root

2021-10-12 Thread grarpamp
> No. The system shell is supposed to make the system usable
> by the users. Actually, the real problem is that the easiest way
> to shoot one's own foot is by changing the language (say, the
> shell) spoken by default by FreeBSD.

Well, the FreeBSD system speaks sh for its own use, this is clearly
documented as the shell called by init(8), and later by rc(8),
it should probably be the root:0 entry at least for consistancy.
No other shell is called by the FreeBSD system there.
Whatever the users want for their own shells is really up
to them to decide after that.

"Default" is bit of low context word, as there is no falling
back to some shell occuring, no filling in for some missing
option, etc. Maybe use word "shipped" or "root" instead.

Everyone said they already do, and will continue to,
exec whatever shell they like, whether after login,
or by changing the entry. So in addition to the user
being ultimately responsible for their own box and usage,
this well announced entry for UPDATING cannot therein
really be responsible for any user self-shooting.

> This is non-sense.

Well, FreeBSD does not add every shell in base,
does not add every app to base, etc.
Some reasons for those limits should be obvious.
This update gives further distilling clarity by
limiting the number of shipped uid 0 entries to 1,
with that 1 being sh.

> Every unix user should know that it's
> possible to changing the used shell by using
> chsh and this includes root.

Then for every user, this update is not a problem.

> BTW, toor default to sh, not tcsh.

No one said that the toor entry does not use sh.


Cheers :)



Re: [HEADSUP] making /bin/sh the default shell for root

2021-10-09 Thread Dmitry Morozovsky
On Thu, 23 Sep 2021, Hans Ottevanger wrote:

[snip]

> While there, you could change "Charlie &" in the gecos field to something more
> sensible, e.g. just "Superuser". I know Charlie is there since 4.2BSD, but the
> reference to a long forgotten baseball player is probably lost by now. Also, a
> lot of explanation is often needed when users receive (automated) emails from
> Charlie Root.

FWIW, my deployment route includes changind this to "`hostname-s` &" which 
helps much when digging into root-robots mail folder

RE: history, "!cmd" and "!?param" would be great if implemented @sh

[snip]

-- 
Sincerely,
D.Marck[DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer:ma...@freebsd.org ]
---
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- woo...@woozle.net ***
---



Re: [HEADSUP] making /bin/sh the default shell for root

2021-10-05 Thread Piotr P. Stefaniak

On 2021-09-22 11:32:36, Baptiste Daroussin wrote:

On Wed, Sep 22, 2021 at 05:19:38AM -0400, Daniel Morante via freebsd-current 
wrote:

Will history/completion continue to work the same way? (for example typing
part of the command, pressing UP and having it complete based on history)


No, this is a csh specific behaviour. (not it can probably be doable via
.shrc, but I haven't checked)


I think that it can be recreated in sh. This works for me:
bind ^[[A ed-search-prev-history
bind ^[[B ed-search-next-history
I believe ^V should work as well as ^[[A or better.

That is not to claim anything about future defaults. This is just a tip.



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-29 Thread Cy Schubert
In message <20210922083645.4vnoajyvwq6wf...@aniel.nours.eu>, Baptiste 
Daroussin
 writes:
> Hello,
>
> TL;DR: this is not a proposal to deorbit csh from base!!!
>
> For years now, csh is the default root shell for FreeBSD, csh can be confusin
> g
> as a default shell for many as all other unix like settled on a bourne shell
> compatible interactive shell: zsh, bash, or variant of ksh.
>
> Recently our sh(1) has receive update to make it more user friendly in
> interactive mode:
> * command completion (thanks pstef@)
> * improvement in the emacs mode, to make it behave by default like other shel
> ls
> * improvement in the vi mode (in particular the vi edit to respect $EDITOR)
> * support for history as described by POSIX.
>
> This makes it a usable shell by default, which is why I would like to propose
>  to
> make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)
>
> If no strong arguments has been raised until October 15th, I will make this
> proposal happen.
>
> Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!

Having used /bin/sh as my root shell on all my FreeBSD machines, here and 
at $JOB, except for only one, I feel this is perfectly reasonable.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  https://FreeBSD.org
NTP:   Web:  https://nwtime.org

The need of the many outweighs the greed of the few.





Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-29 Thread Lucas Nali de Magalhães
It looks like every time I correct an error, someone tries to hack my account… 
odd.

> On Sep 29, 2021, at 3:40 AM, grarpamp  wrote:
> The system shell really only need to support the
> language of the shipped scripts of the base tooling
> such as rc subsystem.

No. The system shell is supposed to make the system usable
by the users. Actually, the real problem is that the easiest way
to shoot one's own foot is by changing the language (say, the
shell) spoken by default by FreeBSD.

> zoor zsh
> toor tcsh
> coor csh
> qoor sql
> poor python
> boor bash
> goor go
> plus the entire rest of world of shellish thingies just
> to satisfy. Which is obviously untenable and absurd and
> causes futher legacies, maintenance, dependencies.
> Where does it stop, what is the limiting definition.
> Moving to just one, some type of an "sh", seems best
> to resolve the question.

This is non-sense. Every unix user should know that it's
possible to changing the used shell by using

chsh

and this includes root. BTW, toor default to sh, not tcsh.

-- 
rollingbits —  rollingb...@icloud.com  rollingb...@gmail.com  
rollingb...@yahoo.com






Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-29 Thread grarpamp
The system shell really only need to support the
language of the shipped scripts of the base tooling
such as rc subsystem.
If those were someday written in Greek, then the shell
serves alone, the most common expectation of any "unix"
to have there seems to be an "sh", from which users can
further customize the box in whatever ways.
Base's simplicity, perhaps that is in part why 14 would go with
sh, and no longer litter the password file with any other shells,
else base must really add and carry them all...
zoor zsh
toor tcsh
coor csh
qoor sql
poor python
boor bash
goor go
plus the entire rest of world of shellish thingies just
to satisfy. Which is obviously untenable and absurd and
causes futher legacies, maintenance, dependencies.
Where does it stop, what is the limiting definition.
Moving to just one, some type of an "sh", seems best
to resolve the question.


> The little help you get on the command line to search and repeat commands is 
> very useful compared to plain "sh".

That is in part why the sh UI appears to be getting some
nice improvements as noted in the HEADSUP / thread.
BSD users could contribute more to that effort,
or run on the systems whichever shells are preferred.


> change "Charlie &" in the gecos field to something more
> sensible, e.g. just "Superuser"

Seconded. It seems somewhat against good idea to
have expandos in and downstream with a passwd file.
This update can also help users minimize parsing and gotcha
bugs by removing some possible escaping/AND/backgrounding
interpretation problems, and reducing complexity and surface.


There's actually been a good bit of stepwise cleaning and
organization of the passwd/group file, and UID/GID
to filesystem/daemons, etc over the years.
It's good to view this as part of that effort as well.


Another problem and lost opportunity cost and burnt cycles
this update finally fixes is the decades worth of N times
a year debate on this issue. It's a cumulative friction and
waste of time. By selecting just one and sh, that goes away,
and can move forward there now too :)


> More bashism and linuxism in BSD world,
> you are waking the devil.

It was meant to say 'sh-like', bash is GPL so it shouldn't
be in BSD base, the two shells just have some common
than with *csh.

Let the beastie daemon... and its more free copyright and unique
approach to the "unix", its ongoing "pros" "innovatives" and much
more that make bsd good... boil the waterparks of linux into vaporware ;)


> Like https://github.com/shellspec/shellbench ?

Interesting tool and data :)



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-28 Thread Mateusz Piotrowski

On 23/09/2021 10:55, Hans Ottevanger wrote:
As you mention elsewhere in this thread, usage in scripts is not affected by these changes. And 
for interactive use it could be a POLA violation, but the astonishment would be a positive one.


Unfortunately, the switch from csh to sh is going to affect scripts. Take a look at this (examples 
below assume that toor uses /bin/sh):


# su root -c 'echo $1' abc def
abc
# su toor -c 'echo $1' abc def
def

Another example:

# ssh -p  root@xxx -- '$@' echo 1 2 3
Illegal variable name.
# ssh -p  toor@xxx -- '$@' echo 1 2 3
1 2 3

I've been bitten by this a couple of times when working with some production scripts. I'm afraid 
changing the default shell to csh may cause a bit of hard-to-debug problems there in the wild.


Otherwise, I'd be happy with having sh(1) as the default shell for root. From my perspective, sh(1) 
was far more forgiving to my colleagues when they started with FreeBSD.


Best,

Mateusz Piotrowski





Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-27 Thread Lucas Nali de Magalhães
> On Sep 27, 2021, at 5:11 AM, Christian Weisgerber  wrote:
> 
> Dirk Meyer:
> 
>> Migration of aliase will be painful as ">&" and "|&" is not supoported.
> 
> cshsh
>> & foo  >foo 2>&1
> |& foo  2>&1 | foo
> 

Actually, the man page of csh says that this part isn't equivalent to the sh 
counterpart
but this issue have no relation to the original problem in this thread.

-- 
rollingbits —  rollingb...@icloud.com  rollingb...@gmail.com  
rollingb...@yahoo.com






Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-27 Thread Christian Weisgerber
Dirk Meyer:

> Migration of aliase will be painful as ">&" and "|&" is not supoported.

csh sh
>& foo  >foo 2>&1
|& foo  2>&1 | foo

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Trev

Hans Petter Selasky wrote on 23/9/21 5:55 pm:
I've always used "tcsh" for root. The little help you get on the command 
line to search and repeat commands is very useful compared to plain "sh".


+1




Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Rick Macklem
Dirk Meyer wrote:
>Baptiste Daroussin schrieb:,
[stuff snipped]
>
>We have already "toor" for sh.
As an aside, I will note that having multiple passwd entries for the same uid 
somewhat
breaks the mapping done by nfsuserd(8), since it will map the uid to one of the 
names.

It is not a big issue, but in my perfect world, there would not be "toor".

I don't have an opinion on what shell root should use.

rick

I disgree on the "user friendly" part of sh.
History search in sh and bash can't hold a candle angainst csh.

Migration of aliase will be painful as ">&" and "|&" is not supoported.

I vote strongly against it.

kind regards Dirk

- Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
- [dirk.me...@dinoex.sub.org],[dirk.me...@guug.de],[din...@freebsd.org]





Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Brooks Davis
On Wed, Sep 22, 2021 at 10:36:45AM +0200, Baptiste Daroussin wrote:
> Hello,
> 
> TL;DR: this is not a proposal to deorbit csh from base!!!
> 
> For years now, csh is the default root shell for FreeBSD, csh can be confusing
> as a default shell for many as all other unix like settled on a bourne shell
> compatible interactive shell: zsh, bash, or variant of ksh.

Think we should switch in 14+.

My main argument is that shell one-liners in documentation are almost
always written in Bourne syntax.  I believe the fact that we're an
outlier is confusing the sort of new users we hope to attract with
thinks like Raspberry-pi and cloud images.  As a long-time user, it even
trips me up when I do some work on a FreeBSD box after spending most of
my time on other systems.

-- Brooks


signature.asc
Description: PGP signature


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Tim Rice



On 9/22/21 8:52 AM, Rodney W. Grimes wrote:
>> On Wed, Sep 22, 2021 at 08:34:58AM -0700, John Baldwin wrote:
>>> I think this is fine.  I would also be fine with either removing 'toor' 
>>> from the
>>> default password file or just leaving it as-is for POLA.  (I would probably
>>> prefer removing it outright.)
>> HardenedBSD recently removed toor. No one has complained (yet?). A
>> small Twitter poll[0] showed that 85% of people who responded do not
>> use toor.
> A truely disastisified customer does not complain, they simply
> go some place else for there products.  Be carefull in what you
> believe silence to be saying.
I do not see csh as root's shell as a pain point.
The #1 pain point on FreeBSD if you are used to various flavors of
linux, Solaris, UnixWare, etc.
is ps(1) not having POSIX style arguments.

-- 

Tim Rice
tim.r...@xinuos.com




Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Lucas Nali de Magalhães
On Sep 23, 2021, at 3:01 PM, Lucas Nali de Magalhães  
wrote:
> 
> 
>>> On Sep 22, 2021, at 5:38 AM, Baptiste Daroussin  wrote:
>>> 
>> TL;DR: this is not a proposal to deorbit csh from base!!! (…)
> 
> I'm used to see FreeBSD remembered as a traditional OS full of professionalism
> and open to innovation. The front door for the BSD world and an OS that 
> doesn't
> copy Linux. But more and more I'm seeing that BSD will need a new front door
> soon, that this OS is becoming more and more another Linux, that 
> professionalism
> is being left aside and that innovation is being undone and/or simply erased.
> I wish I were about to write that it's the first time in a lot of time that I 
> see a problem
> being systematically recreated but this isn't true either. And I feel sad I'm 
> being
> getting used to this, too.
> 
> Mark Millard found that LLVM multi-threaded linker is buggy on Armv7 and 
> reported
> it in another thread. I commented on it, even. It wasn't mention in that 
> thread that the
> numbers there shows another problem recreated that must be solved again. The
> processes there were killed *before* virtual memory started to being heavily 
> used. This
> goes against the intended use of virtual memory. If virtual memory isn't used 
> it's lost
> resource: a thing that must be removed from the system, optimized away. In 
> that
> specific case, virtual memory should have entered into place, being fully 
> filled and then
> the process will be killed. And just to be complete, the non-debuggability of 
> LLVM were
> a known problem of LLVM by the time of the discussions that lead to it's 
> import in the
> tree.

And, by mentioning problems needing solution, I received:

Post to freebsd-a...@freebsd.org denied: Re: [HEADSUP] making /bin/sh the 
default shell for root

This used to not be a problem. I know of what followed were the truth and I've 
no intention in changing
my status about this. And this huge thread is about a cosmetic change. 
Fantastic!

-- 
rollingbits —  rollingb...@icloud.com  rollingb...@gmail.com  
rollingb...@yahoo.com





Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Lucas Nali de Magalhães
> On Sep 22, 2021, at 5:38 AM, Baptiste Daroussin  wrote:
> TL;DR: this is not a proposal to deorbit csh from base!!! (…)

I'm used to see FreeBSD remembered as a traditional OS full of professionalism
and open to innovation. The front door for the BSD world and an OS that doesn't
copy Linux. But more and more I'm seeing that BSD will need a new front door
soon, that this OS is becoming more and more another Linux, that professionalism
is being left aside and that innovation is being undone and/or simply erased.
I wish I were about to write that it's the first time in a lot of time that I 
see a problem
being systematically recreated but this isn't true either. And I feel sad I'm 
being
getting used to this, too.

Mark Millard found that LLVM multi-threaded linker is buggy on Armv7 and 
reported
it in another thread. I commented on it, even. It wasn't mention in that thread 
that the
numbers there shows another problem recreated that must be solved again. The
processes there were killed *before* virtual memory started to being heavily 
used. This
goes against the intended use of virtual memory. If virtual memory isn't used 
it's lost
resource: a thing that must be removed from the system, optimized away. In that
specific case, virtual memory should have entered into place, being fully 
filled and then
the process will be killed. And just to be complete, the non-debuggability of 
LLVM were
a known problem of LLVM by the time of the discussions that lead to it's import 
in the
tree.

-- 
rollingbits —  rollingb...@icloud.com  rollingb...@gmail.com  
rollingb...@yahoo.com





Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Chris

On 2021-09-23 09:40, Rodney W. Grimes wrote:


Quoting Miroslav Lachman <000.f...@quip.cz>:

> On 22/09/2021 22:50, grarpamp wrote:
>>> propose to make it the default shell for root starting FreeBSD 14.0-RELEASE

...


Whoever wants is free to add other users with root pemissions is free
to do so.


That is a zero sum argument.  Ie, same can be said about those who
wish to have the current default changed.  Changing that default is
actually going to require NEW special casing of any code that expects
the now 30+ year default.  Those who DO like it changed, have already
made changes to have it changed, so changing the default only adds
to work for both parties, to me a net loss.

^
I'm well inclined to agree here. But my past expressions of such have
been largely been ignored. In *this* case; it's not a big affect for me;
as I roll out all my updates from build farms. So all my users are already
predefined, and their dot files are preserved. But still,
more changes == more work. :-(

Out of curiosity; has anyone actually done a real assessment to determine
the *actual* value of this (proposed) change? I mean in the end, do we
really know the cost to loss ratio?

--Chris


Leave the defaults alone, provide tools and such to make it easier
for people to tweak those defaults on install.  Stop adding work
to both the people who like how it is now, and people who like
the idea of this change, its not productive for anyone.



Rolf M Dietze


0xBDE49540.asc
Description: application/pgp-keys


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Christian Groessler

I'd say, leave it as it is.

People are used to it since over 30 years.

Where does it hurt?

regards,
chris




Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Rodney W. Grimes
> On 9/22/21 10:36 AM, Baptiste Daroussin wrote:
> > Hello,
> > 
> > TL;DR: this is not a proposal to deorbit csh from base!!!
> > 
> > For years now, csh is the default root shell for FreeBSD, csh can be 
> > confusing
> > as a default shell for many as all other unix like settled on a bourne shell
> > compatible interactive shell: zsh, bash, or variant of ksh.
> > 
> > Recently our sh(1) has receive update to make it more user friendly in
> > interactive mode:
> > * command completion (thanks pstef@)
> > * improvement in the emacs mode, to make it behave by default like other 
> > shells
> > * improvement in the vi mode (in particular the vi edit to respect $EDITOR)
> > * support for history as described by POSIX.
> > 
> > This makes it a usable shell by default, which is why I would like to 
> > propose to
> > make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)
> > 
> > If no strong arguments has been raised until October 15th, I will make this
> > proposal happen.
> > 
> > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!
> > 
> > Best regards,
> > Baptiste
> > 
> 
> Hello,
> 
> I applaud the proposal to change the default login shell of root to 
> /bin/sh. As you mention the rest of the Unix(-like) world has used a 
> Bourne-like root login shell forever. It is one of the first things I 
> change on a new FreeBSD install anyway.

So now you stop changing it, something you have grown use to doing,
and all of us who want the old behavior have to add a change item
to our list of post install stuff.  We BOTH end up with version
conditional tweaks to the base system.  Is that a good idea?

> While there, you could change "Charlie &" in the gecos field to 
> something more sensible, e.g. just "Superuser". I know Charlie is there 
> since 4.2BSD, but the reference to a long forgotten baseball player is 
> probably lost by now. Also, a lot of explanation is often needed when 
> users receive (automated) emails from Charlie Root.
> 
> Once the login shell of root has changed to /bin/sh, I do not see any 
> reason to keep toor around. It is there since 4.3BSD, but I don't know 
> anybody who uses it in the long term. Many will just change the login 
> shell of root to a Bourne-like shell right away.

Your lack of knowing anyone who uses it, does not indicate lack
of use.  If I want a /bin/sh root user I type:
su - toor
So now you know someone who uses it!

> 
> I have experimented a bit with the new usability features of sh in 14.0 
> and I must say that it was quite a positive experience. I could easily 
> suppress the urge to install and use bash instead of sh. I wonder if the 
> changes (but not the ones to /etc/passwd) could be MFC'd in a few 
> months, once they have matured a bit, so they would land in 13.1. As you 
> mention elsewhere in this thread, usage in scripts is not affected by 
> these changes. And for interactive use it could be a POLA violation, but 
> the astonishment would be a positive one.
> 
> -- 
> Kind regards,
> 
> Hans Ottevanger
> 
> Eindhoven, Netherlands.
> h...@beastielabs.net
> www.beastielabs.net
> 
> 

-- 
Rod Grimes rgri...@freebsd.org



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Piotr P. Stefaniak

On 2021-09-23 09:40:50, Rodney W. Grimes wrote:

Those who DO like it changed, have already made changes to have it
changed, so changing the default only adds to work for both parties, to
me a net loss.


Aren't you forgetting about someone?



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Rodney W. Grimes
> 
> Quoting Miroslav Lachman <000.f...@quip.cz>:
> 
> > On 22/09/2021 22:50, grarpamp wrote:
> >>> propose to make it the default shell for root starting FreeBSD 
> >>> 14.0-RELEASE
> >>
> >> Make it so.
> >>
> >> The whole rest of rc, pkg, base scripts and subsystems use a lot of  
> >> sh, not csh.
> >> So this is a good compatibility, consistancy, and gotcha-removing update,
> >> needed for decades.
> >>
> >> Even "bash" is a majority spoken shell in Linux/world, helping
> >> make crossovers if BSD becomes a bit more bash-like.
> >
> > More bashism and linuxism in BSD world, you are waking the devil.
> >
> >> The bsd sh feature updates are filling useful/needed capability gaps.
> >
> > Moving to sh without maintain the same history search behavior  
> > (start of the command and Up & Down arrows) are like cutting one leg.
> >
> > The (t)csh is what I really like on every FreeBSD machine. Never  
> > seen good configured bash (prompt + history search) on any other OS  
> > I ever visited. Not saying it is not possible but if FreeBSD will  
> > switch default shell to something else I expect to do it the way  
> > that it is more user friendly and powerful than on other OSes where  
> > everything is leaved to "users can customize it". Current state of  
> > sh behavior is really that "bad" way.
> we are talking of the default sehll for the root user. One does not
> really work as root user, but if son nothing stops who ever wants to
> to exec zsh or exec tcsh?
> 
> Whoever wants is free to add other users with root pemissions is free
> to do so.

That is a zero sum argument.  Ie, same can be said about those who
wish to have the current default changed.  Changing that default is
actually going to require NEW special casing of any code that expects
the now 30+ year default.  Those who DO like it changed, have already
made changes to have it changed, so changing the default only adds
to work for both parties, to me a net loss.

Leave the defaults alone, provide tools and such to make it easier
for people to tweak those defaults on install.  Stop adding work
to both the people who like how it is now, and people who like
the idea of this change, its not productive for anyone.


> Rolf M Dietze

-- 
Rod Grimes rgri...@freebsd.org



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Chris

On 2021-09-23 02:29, Mike Bristow wrote:

On Wed, Sep 22, 2021 at 10:00:49AM -0300, Renato Botelho wrote:

+1 for keeping this behavior on default config


-1 for this.

Things should be as default-as-possible, so that the behaviour of
/bin/sh as root on FreeBSD is unsuprising to someone used to /bin/sh
on other systems or users, because they won't be used to the magic
config.

I have no problem with a section of root's .profile having the
approprate magic commented out so that folk who want this can easily
have it, of course.

OK this bit confuses me.
If you logon as root. Then simply exec vipw(8) and change the default
shell to (t)csh. The .cshrc template will sucked out of /etc/ into /root/
where you'll live happily ever after. No (un)commenting involved. :-)

--Chris


Cheers,
Mike


0xBDE49540.asc
Description: application/pgp-keys


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Chris

On 2021-09-23 01:55, Hans Ottevanger wrote:

On 9/22/21 10:36 AM, Baptiste Daroussin wrote:

Hello,

TL;DR: this is not a proposal to deorbit csh from base!!!

For years now, csh is the default root shell for FreeBSD, csh can be 
confusing
as a default shell for many as all other unix like settled on a bourne 
shell

compatible interactive shell: zsh, bash, or variant of ksh.

Recently our sh(1) has receive update to make it more user friendly in
interactive mode:
* command completion (thanks pstef@)
* improvement in the emacs mode, to make it behave by default like other 
shells

* improvement in the vi mode (in particular the vi edit to respect $EDITOR)
* support for history as described by POSIX.

This makes it a usable shell by default, which is why I would like to 
propose to
make it the default shell for root starting FreeBSD 14.0-RELEASE (not 
MFCed)


If no strong arguments has been raised until October 15th, I will make this
proposal happen.

Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!

Best regards,
Baptiste



Hello,

I applaud the proposal to change the default login shell of root to /bin/sh. 
As
you mention the rest of the Unix(-like) world has used a Bourne-like root 
login
shell forever. It is one of the first things I change on a new FreeBSD 
install

anyway.

While there, you could change "Charlie &" in the gecos field to something 
more
sensible, e.g. just "Superuser". I know Charlie is there since 4.2BSD, but 
the
reference to a long forgotten baseball player is probably lost by now. Also, 
a lot
of explanation is often needed when users receive (automated) emails from 
Charlie

Root.

Once the login shell of root has changed to /bin/sh, I do not see any reason 
to
keep toor around. It is there since 4.3BSD, but I don't know anybody who 
uses it
in the long term. Many will just change the login shell of root to a 
Bourne-like

shell right away.

I have experimented a bit with the new usability features of sh in 14.0 and 
I must
say that it was quite a positive experience. I could easily suppress the 
urge to
install and use bash instead of sh. I wonder if the changes (but not the 
ones to
/etc/passwd) could be MFC'd in a few months, once they have matured a bit, 
so they


It was mentioned in the OP this *wouldn't* be MFC'd. An aspect I'm glad to 
hear.


would land in 13.1. As you mention elsewhere in this thread, usage in 
scripts is

not affected by these changes. And for interactive use it could be a POLA
violation, but the astonishment would be a positive one.


--Chris

0xBDE49540.asc
Description: application/pgp-keys


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Julian H. Stacey
Gary Jennejohn wrote:
> On Wed, 22 Sep 2021 08:52:53 -0700 (PDT)
> "Rodney W. Grimes"  wrote:
>
> > > On Wed, Sep 22, 2021 at 08:34:58AM -0700, John Baldwin wrote:  
> > > > On 9/22/21 1:36 AM, Baptiste Daroussin wrote:  
> > > > > Hello,
> > > > > 
> > > > > TL;DR: this is not a proposal to deorbit csh from base!!!
> > > > > 
> > > > > For years now, csh is the default root shell for FreeBSD, csh can be 
> > > > > confusing
> > > > > as a default shell for many as all other unix like settled on a 
> > > > > bourne shell
> > > > > compatible interactive shell: zsh, bash, or variant of ksh.
> > > > > 
> > > > > Recently our sh(1) has receive update to make it more user friendly in
> > > > > interactive mode:
> > > > > * command completion (thanks pstef@)
> > > > > * improvement in the emacs mode, to make it behave by default like 
> > > > > other shells
> > > > > * improvement in the vi mode (in particular the vi edit to respect 
> > > > > $EDITOR)
> > > > > * support for history as described by POSIX.
> > > > > 
> > > > > This makes it a usable shell by default, which is why I would like to 
> > > > > propose to
> > > > > make it the default shell for root starting FreeBSD 14.0-RELEASE (not 
> > > > > MFCed)
> > > > > 
> > > > > If no strong arguments has been raised until October 15th, I will 
> > > > > make this
> > > > > proposal happen.
> > > > > 
> > > > > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!  
> > > > 
> > > > I think this is fine.  I would also be fine with either removing 'toor' 
> > > > from the
> > > > default password file or just leaving it as-is for POLA.  (I would 
> > > > probably
> > > > prefer removing it outright.)  
> > > 
> > > HardenedBSD recently removed toor. No one has complained (yet?). A
> > > small Twitter poll[0] showed that 85% of people who responded do not
> > > use toor.  
> > 
> > A truely disastisified customer does not complain, they simply
> > go some place else for there products.  Be carefull in what you
> > believe silence to be saying.
> > 
>
> I use toor on every FreeBSD machine as the root login using bash.
> I never log in as root.

Toor has been an occasional lifeline during re-build dissters.
Need root & toor to have different executables,
& home directories & passwords, & no environment vars on one etc.

> But removing it wouldn't be a deal breaker for me.  I'd just put it
> back into /etc/passwd.

Ditto.  `One Best Tool' debates can consume time.

Best keep time for other things, ( eg I've an interesting regression to chase:
12.2-RELEASE OK, but 12.2-STABLE & 13.0-RELEASE Generic kernels panic on
boot & wont produce a /var/crash/vmcore.2 & won't drop into DDB ).

Cheers,
-- 
Julian Stacey  http://berklix.com/jhs/  http://stolenvotes.uk



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Mike Bristow
On Wed, Sep 22, 2021 at 10:00:49AM -0300, Renato Botelho wrote:
> +1 for keeping this behavior on default config

-1 for this.

Things should be as default-as-possible, so that the behaviour of
/bin/sh as root on FreeBSD is unsuprising to someone used to /bin/sh
on other systems or users, because they won't be used to the magic
config.

I have no problem with a section of root's .profile having the
approprate magic commented out so that folk who want this can easily
have it, of course.

Cheers,
Mike


-- 
Mike Bristow  m...@urgle.com




Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Hans Ottevanger

On 9/22/21 10:36 AM, Baptiste Daroussin wrote:

Hello,

TL;DR: this is not a proposal to deorbit csh from base!!!

For years now, csh is the default root shell for FreeBSD, csh can be confusing
as a default shell for many as all other unix like settled on a bourne shell
compatible interactive shell: zsh, bash, or variant of ksh.

Recently our sh(1) has receive update to make it more user friendly in
interactive mode:
* command completion (thanks pstef@)
* improvement in the emacs mode, to make it behave by default like other shells
* improvement in the vi mode (in particular the vi edit to respect $EDITOR)
* support for history as described by POSIX.

This makes it a usable shell by default, which is why I would like to propose to
make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)

If no strong arguments has been raised until October 15th, I will make this
proposal happen.

Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!

Best regards,
Baptiste



Hello,

I applaud the proposal to change the default login shell of root to 
/bin/sh. As you mention the rest of the Unix(-like) world has used a 
Bourne-like root login shell forever. It is one of the first things I 
change on a new FreeBSD install anyway.


While there, you could change "Charlie &" in the gecos field to 
something more sensible, e.g. just "Superuser". I know Charlie is there 
since 4.2BSD, but the reference to a long forgotten baseball player is 
probably lost by now. Also, a lot of explanation is often needed when 
users receive (automated) emails from Charlie Root.


Once the login shell of root has changed to /bin/sh, I do not see any 
reason to keep toor around. It is there since 4.3BSD, but I don't know 
anybody who uses it in the long term. Many will just change the login 
shell of root to a Bourne-like shell right away.


I have experimented a bit with the new usability features of sh in 14.0 
and I must say that it was quite a positive experience. I could easily 
suppress the urge to install and use bash instead of sh. I wonder if the 
changes (but not the ones to /etc/passwd) could be MFC'd in a few 
months, once they have matured a bit, so they would land in 13.1. As you 
mention elsewhere in this thread, usage in scripts is not affected by 
these changes. And for interactive use it could be a POLA violation, but 
the astonishment would be a positive one.


--
Kind regards,

Hans Ottevanger

Eindhoven, Netherlands.
h...@beastielabs.net
www.beastielabs.net



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Miroslav Lachman

On 23/09/2021 10:13, Rolf M. Dietze wrote:


Quoting Miroslav Lachman <000.f...@quip.cz>:


On 22/09/2021 22:50, grarpamp wrote:
propose to make it the default shell for root starting FreeBSD 
14.0-RELEASE


Make it so.

The whole rest of rc, pkg, base scripts and subsystems use a lot of 
sh, not csh.
So this is a good compatibility, consistancy, and gotcha-removing 
update,

needed for decades.

Even "bash" is a majority spoken shell in Linux/world, helping
make crossovers if BSD becomes a bit more bash-like.


More bashism and linuxism in BSD world, you are waking the devil.


The bsd sh feature updates are filling useful/needed capability gaps.


Moving to sh without maintain the same history search behavior (start 
of the command and Up & Down arrows) are like cutting one leg.


The (t)csh is what I really like on every FreeBSD machine. Never seen 
good configured bash (prompt + history search) on any other OS I ever 
visited. Not saying it is not possible but if FreeBSD will switch 
default shell to something else I expect to do it the way that it is 
more user friendly and powerful than on other OSes where everything is 
leaved to "users can customize it". Current state of sh behavior is 
really that "bad" way.



we are talking of the default sehll for the root user. One does not
really work as root user, but if son nothing stops who ever wants to
to exec zsh or exec tcsh?


It seems like "nobody" and "everybody" mistaken words. If "one" really 
does not work as root user then what is the meaning of the first 
paragraph from Baptiste's message and why change something?


Miroslav Lachman



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Rolf M. Dietze



Quoting Miroslav Lachman <000.f...@quip.cz>:


On 22/09/2021 22:50, grarpamp wrote:

propose to make it the default shell for root starting FreeBSD 14.0-RELEASE


Make it so.

The whole rest of rc, pkg, base scripts and subsystems use a lot of  
sh, not csh.

So this is a good compatibility, consistancy, and gotcha-removing update,
needed for decades.

Even "bash" is a majority spoken shell in Linux/world, helping
make crossovers if BSD becomes a bit more bash-like.


More bashism and linuxism in BSD world, you are waking the devil.


The bsd sh feature updates are filling useful/needed capability gaps.


Moving to sh without maintain the same history search behavior  
(start of the command and Up & Down arrows) are like cutting one leg.


The (t)csh is what I really like on every FreeBSD machine. Never  
seen good configured bash (prompt + history search) on any other OS  
I ever visited. Not saying it is not possible but if FreeBSD will  
switch default shell to something else I expect to do it the way  
that it is more user friendly and powerful than on other OSes where  
everything is leaved to "users can customize it". Current state of  
sh behavior is really that "bad" way.

we are talking of the default sehll for the root user. One does not
really work as root user, but if son nothing stops who ever wants to
to exec zsh or exec tcsh?

Whoever wants is free to add other users with root pemissions is free
to do so.


Rolf M Dietze






Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Hans Petter Selasky

Hi,

I've always used "tcsh" for root. The little help you get on the command 
line to search and repeat commands is very useful compared to plain "sh".


Sorry for top-posting.

--HPS



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Miroslav Lachman

On 22/09/2021 22:50, grarpamp wrote:

propose to make it the default shell for root starting FreeBSD 14.0-RELEASE


Make it so.

The whole rest of rc, pkg, base scripts and subsystems use a lot of sh, not csh.
So this is a good compatibility, consistancy, and gotcha-removing update,
needed for decades.

Even "bash" is a majority spoken shell in Linux/world, helping
make crossovers if BSD becomes a bit more bash-like.


More bashism and linuxism in BSD world, you are waking the devil.


The bsd sh feature updates are filling useful/needed capability gaps.


Moving to sh without maintain the same history search behavior (start of 
the command and Up & Down arrows) are like cutting one leg.


The (t)csh is what I really like on every FreeBSD machine. Never seen 
good configured bash (prompt + history search) on any other OS I ever 
visited. Not saying it is not possible but if FreeBSD will switch 
default shell to something else I expect to do it the way that it is 
more user friendly and powerful than on other OSes where everything is 
leaved to "users can customize it". Current state of sh behavior is 
really that "bad" way.


If you want to catch users on sh, do it better, please!


"csh considered harmful"

toor needs to go as part of simple cruft removal for a cleaner base,
else you would have to add zoor, koor, boor, toor, etc. No no no no!

Nobody leave FreeBSD just to get run csh on their windows command prompt ;)

Users are always free to customize local installs as desired.


It cuts both ways. If users are free to customize they can switch from 
current default csh to sh and no change in base is needed.



Miroslav Lachman



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-23 Thread Alex Dupre
+100 for keeping this behavior on default config ;-)

On 22/09/21 15:00, Renato Botelho wrote:
> +1 for keeping this behavior on default config
> 
> On 22/09/21 06:19, Daniel Morante via freebsd-current wrote:
>> Will history/completion continue to work the same way? (for example
>> typing part of the command, pressing UP and having it complete based
>> on history)
-- 
Alex Dupre



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Jan Beich
Jan Beich  writes:

> grarpamp  writes:
>
>> BSD community can definitely volunteer to make benchmark of
>> its shell vs others, determine if and where improvements to make.
>> Many apps never get checked for obvious speedups,
>> if so it might become fastest shell even with the new features.
>
> Like https://github.com/shellspec/shellbench ?
> I did check a month ago (on 2021-08-31) but forgot NetBSD sh(1).
> Obviously, the results may vary per OS/version/architecture/hardware.

Nevemind. I've tested inside jail (probably 12.2 amd64) instead of -CURRENT.



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Jan Beich
grarpamp  writes:

> BSD community can definitely volunteer to make benchmark of
> its shell vs others, determine if and where improvements to make.
> Many apps never get checked for obvious speedups,
> if so it might become fastest shell even with the new features.

Like https://github.com/shellspec/shellbench ?
I did check a month ago (on 2021-08-31) but forgot NetBSD sh(1).
Obviously, the results may vary per OS/version/architecture/hardware.

$ ./shellbench -s sh,dash,busybox/sh,bash,zsh,oksh,ksh93,yash sample/*.sh
--
name   sh   dash busybox/sh   bash  
  zsh   oksh  ksh93   yash
--
assign.sh: positional params1,983,164747,830666,979443,083
551,071875,915479,129395,225
assign.sh: variable 2,405,745827,904741,112616,017  
1,308,457  1,013,153588,698510,636
assign.sh: local var2,398,554834,027747,871603,486  
1,293,027  1,007,511  error503,410
assign.sh: local var (typeset)  error  error  error616,483  
1,306,641  1,011,383544,136504,782
cmp.sh: [ ] 1,628,216567,700465,761352,438
336,288713,738518,768297,987
cmp.sh: [[ ]]   error  error  error480,974
595,441903,502613,269376,550
cmp.sh: case2,527,633  1,196,339  1,024,253606,588
632,811959,232628,183450,893
count.sh: posix 1,640,683717,178589,330463,934
907,140700,233376,361398,937
count.sh: typeset -ierror  error  error452,029
907,541652,885385,585  error
count.sh: increment error  error  error581,631  
1,264,962845,738581,111  error
eval.sh: direct assign  1,670,797564,299518,082308,709
198,714722,050285,150279,020
eval.sh: eval assign1,102,774393,161332,925194,636
156,834476,164173,156192,191
eval.sh: command subs   2,188  5,828  4,830  2,208  
1,597  5,015  ?  4,302
func.sh: no func2,451,641836,115756,258614,579
711,116  1,087,770571,210507,644
func.sh: func   1,947,254596,731542,519349,748
187,903845,681306,506313,989
null.sh: blank  3,094,116  error  error  error  
1,529,326  1,304,367  error593,711
null.sh: assign variable2,419,811845,676751,887669,694  
1,374,858  1,012,724599,490533,401
null.sh: define function2,687,933  1,259,149  1,076,947661,432  
1,270,777  1,085,654584,490525,184
null.sh: undefined variable 2,445,429839,334750,904505,147
631,862  1,048,805473,900501,851
null.sh: : command  2,418,617839,744742,385610,307
701,972  1,064,089565,323500,879
output.sh: echo 1,518,368669,539620,417404,729
544,030781,488540,064380,174
output.sh: printf   1,481,745632,454535,170395,649
534,303  1,556258,827365,724
output.sh: printerror  error  error  error
542,740775,812353,320  error
subshell.sh: no subshell2,330,179819,359729,753571,353
705,892  1,005,262560,780485,498
subshell.sh: brace  2,343,747833,142728,803554,948
568,470984,156557,069413,438
subshell.sh: subshell   3,444  6,917  2,814  1,190  
3,578  3,391240,738  2,570
subshell.sh: command subs   1,871,462  3,806  5,966  2,766  
2,709  4,564146,388  3,691
subshell.sh: external command   1,112996579893  
2,190  2,529  1,728  1,778
--
* count: number of executions per second



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Baptiste Daroussin
On Wed, Sep 22, 2021 at 10:03:40PM +0200, Alban Hertroys wrote:
> 
> > On 22 Sep 2021, at 10:36, Baptiste Daroussin  wrote:
> > 
> > Hello,
> > 
> > TL;DR: this is not a proposal to deorbit csh from base!!!
> 
> (…)
> 
> > Recently our sh(1) has receive update to make it more user friendly in
> > interactive mode:
> > * command completion (thanks pstef@)
> > * improvement in the emacs mode, to make it behave by default like other 
> > shells
> > * improvement in the vi mode (in particular the vi edit to respect $EDITOR)
> > * support for history as described by POSIX.
> > 
> > This makes it a usable shell by default, which is why I would like to 
> > propose to
> > make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)
> 
> My one concern is this: what is the impact of these usability improvements to 
> sh on its usage in scripts?

None, those are in a code path with doesn't get executed when in non interactive
mode.

Best regards,
Bapt



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Chris

On 2021-09-22 12:26, Marek Zarychta wrote:

W dniu 22.09.2021 o 19:46, Warner Losh pisze:

On Wed, Sep 22, 2021 at 9:35 AM John Baldwin  wrote:


On 9/22/21 1:36 AM, Baptiste Daroussin wrote:

Hello,

TL;DR: this is not a proposal to deorbit csh from base!!!

For years now, csh is the default root shell for FreeBSD, csh can be

confusing

as a default shell for many as all other unix like settled on a bourne

shell

compatible interactive shell: zsh, bash, or variant of ksh.

Recently our sh(1) has receive update to make it more user friendly in
interactive mode:
* command completion (thanks pstef@)
* improvement in the emacs mode, to make it behave by default like other

shells

* improvement in the vi mode (in particular the vi edit to respect

$EDITOR)

* support for history as described by POSIX.

This makes it a usable shell by default, which is why I would like to

propose to

make it the default shell for root starting FreeBSD 14.0-RELEASE (not

MFCed)


If no strong arguments has been raised until October 15th, I will make

this

proposal happen.

Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!


I think this is fine.  I would also be fine with either removing 'toor'
from the
default password file or just leaving it as-is for POLA.  (I would 
probably

prefer removing it outright.)



I think this is also fine. I also think we should remove toor from the
default
password file for one fewer attack surfaces. I strongly prefer this. Users
that want toor can add it to their system and/or provisioning scripts.

Warner



I am curious which attacks you are referring to since I have never heard
of attacks on toor account. I have seen a lot of malware attacking root,
admin, nobody, and other accounts, but never toor.

In the 30 some yrs I've been on UNIX and the likes. I've only ever known
~half a dozen administrators that ever choose toor. Those that want to
continue doing so, will not be prevented from continuing to do so.


TBH toor might be handy as a backdoor account if you are familiar with
FreeBSD enough to take advantage of it. It can also act as an account of
last resort when someone breaks into your system and changes root
password, wipes ssh keys etc, so it cuts both ways, not even mentioning
 POLA.

TBH this is a non-issue. toor is simply an alias to root.
Anyone that has a root hacked system need only spin up the FreeBSD mini
iso/img, mount their hacked system && hack back into shape. :-)

Props to all the work and proposed changes here. Thanks! :-)

--Chris

P.S. This is NOT a bike shed.


The transition from csh to sh as a default root's shell will probably
save some CPU cycles for people using Chef, Ansible, etc thus pushing
FreeBSD toward green computing. Sysadmins bound to csh will be fine
until it remains in the base system and chsh works.

I shouldn't probably post here since I am only a voice from the userbase
but can't help doing so.

Kind regards,


0xBDE49540.asc
Description: application/pgp-keys


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Juraj Lutter


> On 22 Sep 2021, at 10:36, Baptiste Daroussin  wrote:

> Hello,
> 
> TL;DR: this is not a proposal to deorbit csh from base!!!
> 
> 
> This makes it a usable shell by default, which is why I would like to propose 
> to
> make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)
> 


Thanks for this!

What I miss a bit is a completion triggered by delete-char-or-list-or-eof (^D) 
as it was in (t)csh.

otis

—
Juraj Lutter
o...@freebsd.org



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread grarpamp
> propose to make it the default shell for root starting FreeBSD 14.0-RELEASE

Make it so.

The whole rest of rc, pkg, base scripts and subsystems use a lot of sh, not csh.
So this is a good compatibility, consistancy, and gotcha-removing update,
needed for decades.

Even "bash" is a majority spoken shell in Linux/world, helping
make crossovers if BSD becomes a bit more bash-like.
The bsd sh feature updates are filling useful/needed capability gaps.

"csh considered harmful"

toor needs to go as part of simple cruft removal for a cleaner base,
else you would have to add zoor, koor, boor, toor, etc. No no no no!

Nobody leave FreeBSD just to get run csh on their windows command prompt ;)

Users are always free to customize local installs as desired.

BSD community can definitely volunteer to make benchmark of
its shell vs others, determine if and where improvements to make.
Many apps never get checked for obvious speedups,
if so it might become fastest shell even with the new features.



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Alban Hertroys


> On 22 Sep 2021, at 10:36, Baptiste Daroussin  wrote:
> 
> Hello,
> 
> TL;DR: this is not a proposal to deorbit csh from base!!!

(…)

> Recently our sh(1) has receive update to make it more user friendly in
> interactive mode:
> * command completion (thanks pstef@)
> * improvement in the emacs mode, to make it behave by default like other 
> shells
> * improvement in the vi mode (in particular the vi edit to respect $EDITOR)
> * support for history as described by POSIX.
> 
> This makes it a usable shell by default, which is why I would like to propose 
> to
> make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)

My one concern is this: what is the impact of these usability improvements to 
sh on its usage in scripts?

I can imagine that there is merit to having a separate shell that is optimised 
for scriptability and script performance and having a different shell for user 
interaction. It seems to me the former was a primary purpose of sh? How much 
“weight” did it gain in becoming more user friendly and how will that impact 
script performance?

I’ve been using FreeBSD with some frequency since 2.2.5 or so, so I am used 
enough to getting csh as root shell to not be able to see the problem that this 
change is trying to solve. Call me biased.

My purpose is just to throw in a different point of view here, I’m not a big sh 
script user myself (I think I wrote less than a dozen over the years), this is 
not something for me to judge.

Alban Hertroys
--
There is always an exception to always.







Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Marek Zarychta
W dniu 22.09.2021 o 19:46, Warner Losh pisze:
> On Wed, Sep 22, 2021 at 9:35 AM John Baldwin  wrote:
> 
>> On 9/22/21 1:36 AM, Baptiste Daroussin wrote:
>>> Hello,
>>>
>>> TL;DR: this is not a proposal to deorbit csh from base!!!
>>>
>>> For years now, csh is the default root shell for FreeBSD, csh can be
>> confusing
>>> as a default shell for many as all other unix like settled on a bourne
>> shell
>>> compatible interactive shell: zsh, bash, or variant of ksh.
>>>
>>> Recently our sh(1) has receive update to make it more user friendly in
>>> interactive mode:
>>> * command completion (thanks pstef@)
>>> * improvement in the emacs mode, to make it behave by default like other
>> shells
>>> * improvement in the vi mode (in particular the vi edit to respect
>> $EDITOR)
>>> * support for history as described by POSIX.
>>>
>>> This makes it a usable shell by default, which is why I would like to
>> propose to
>>> make it the default shell for root starting FreeBSD 14.0-RELEASE (not
>> MFCed)
>>>
>>> If no strong arguments has been raised until October 15th, I will make
>> this
>>> proposal happen.
>>>
>>> Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!
>>
>> I think this is fine.  I would also be fine with either removing 'toor'
>> from the
>> default password file or just leaving it as-is for POLA.  (I would probably
>> prefer removing it outright.)
>>
> 
> I think this is also fine. I also think we should remove toor from the
> default
> password file for one fewer attack surfaces. I strongly prefer this. Users
> that want toor can add it to their system and/or provisioning scripts.
> 
> Warner
> 

I am curious which attacks you are referring to since I have never heard
of attacks on toor account. I have seen a lot of malware attacking root,
admin, nobody, and other accounts, but never toor.

TBH toor might be handy as a backdoor account if you are familiar with
FreeBSD enough to take advantage of it. It can also act as an account of
last resort when someone breaks into your system and changes root
password, wipes ssh keys etc, so it cuts both ways, not even mentioning
 POLA.

The transition from csh to sh as a default root's shell will probably
save some CPU cycles for people using Chef, Ansible, etc thus pushing
FreeBSD toward green computing. Sysadmins bound to csh will be fine
until it remains in the base system and chsh works.

I shouldn't probably post here since I am only a voice from the userbase
but can't help doing so.

Kind regards,
-- 
Marek Zarychta



OpenPGP_signature
Description: OpenPGP digital signature


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Tom Jones
On Wed, Sep 22, 2021 at 08:34:58AM -0700, John Baldwin wrote:
> On 9/22/21 1:36 AM, Baptiste Daroussin wrote:
> > Hello,
> > 
> > TL;DR: this is not a proposal to deorbit csh from base!!!
> > 
> > For years now, csh is the default root shell for FreeBSD, csh can be 
> > confusing
> > as a default shell for many as all other unix like settled on a bourne shell
> > compatible interactive shell: zsh, bash, or variant of ksh.
> > 
> > Recently our sh(1) has receive update to make it more user friendly in
> > interactive mode:
> > * command completion (thanks pstef@)
> > * improvement in the emacs mode, to make it behave by default like other 
> > shells
> > * improvement in the vi mode (in particular the vi edit to respect $EDITOR)
> > * support for history as described by POSIX.
> > 
> > This makes it a usable shell by default, which is why I would like to 
> > propose to
> > make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)
> > 
> > If no strong arguments has been raised until October 15th, I will make this
> > proposal happen.
> > 
> > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!
> 
> I think this is fine.  I would also be fine with either removing 'toor' from 
> the
> default password file or just leaving it as-is for POLA.  (I would probably
> prefer removing it outright.)

I support both of these suggestions, when I first installed FreeBSD
~2006 toor already felt like a strange an anachronism.

- Tom



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Gary Jennejohn
On Wed, 22 Sep 2021 08:52:53 -0700 (PDT)
"Rodney W. Grimes"  wrote:

> > On Wed, Sep 22, 2021 at 08:34:58AM -0700, John Baldwin wrote:  
> > > On 9/22/21 1:36 AM, Baptiste Daroussin wrote:  
> > > > Hello,
> > > > 
> > > > TL;DR: this is not a proposal to deorbit csh from base!!!
> > > > 
> > > > For years now, csh is the default root shell for FreeBSD, csh can be 
> > > > confusing
> > > > as a default shell for many as all other unix like settled on a bourne 
> > > > shell
> > > > compatible interactive shell: zsh, bash, or variant of ksh.
> > > > 
> > > > Recently our sh(1) has receive update to make it more user friendly in
> > > > interactive mode:
> > > > * command completion (thanks pstef@)
> > > > * improvement in the emacs mode, to make it behave by default like 
> > > > other shells
> > > > * improvement in the vi mode (in particular the vi edit to respect 
> > > > $EDITOR)
> > > > * support for history as described by POSIX.
> > > > 
> > > > This makes it a usable shell by default, which is why I would like to 
> > > > propose to
> > > > make it the default shell for root starting FreeBSD 14.0-RELEASE (not 
> > > > MFCed)
> > > > 
> > > > If no strong arguments has been raised until October 15th, I will make 
> > > > this
> > > > proposal happen.
> > > > 
> > > > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!  
> > > 
> > > I think this is fine.  I would also be fine with either removing 'toor' 
> > > from the
> > > default password file or just leaving it as-is for POLA.  (I would 
> > > probably
> > > prefer removing it outright.)  
> > 
> > HardenedBSD recently removed toor. No one has complained (yet?). A
> > small Twitter poll[0] showed that 85% of people who responded do not
> > use toor.  
> 
> A truely disastisified customer does not complain, they simply
> go some place else for there products.  Be carefull in what you
> believe silence to be saying.
> 

I use toor on every FreeBSD machine as the root login using bash.
I never log in as root.

But removing it wouldn't be a deal breaker for me.  I'd just put it
back into /etc/passwd.

> > 
> > [0]: https://twitter.com/HardenedBSD/status/1415781911063056389
> > 
> > Thanks,
> > 
> > -- 
> > Shawn Webb
> > Cofounder / Security Engineer
> > HardenedBSD
> > 
> > https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc
> >   
> 
> -- 
> Rod Grimes rgri...@freebsd.org
> 


-- 
Gary Jennejohn



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Warner Losh
On Wed, Sep 22, 2021 at 9:35 AM John Baldwin  wrote:

> On 9/22/21 1:36 AM, Baptiste Daroussin wrote:
> > Hello,
> >
> > TL;DR: this is not a proposal to deorbit csh from base!!!
> >
> > For years now, csh is the default root shell for FreeBSD, csh can be
> confusing
> > as a default shell for many as all other unix like settled on a bourne
> shell
> > compatible interactive shell: zsh, bash, or variant of ksh.
> >
> > Recently our sh(1) has receive update to make it more user friendly in
> > interactive mode:
> > * command completion (thanks pstef@)
> > * improvement in the emacs mode, to make it behave by default like other
> shells
> > * improvement in the vi mode (in particular the vi edit to respect
> $EDITOR)
> > * support for history as described by POSIX.
> >
> > This makes it a usable shell by default, which is why I would like to
> propose to
> > make it the default shell for root starting FreeBSD 14.0-RELEASE (not
> MFCed)
> >
> > If no strong arguments has been raised until October 15th, I will make
> this
> > proposal happen.
> >
> > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!
>
> I think this is fine.  I would also be fine with either removing 'toor'
> from the
> default password file or just leaving it as-is for POLA.  (I would probably
> prefer removing it outright.)
>

I think this is also fine. I also think we should remove toor from the
default
password file for one fewer attack surfaces. I strongly prefer this. Users
that want toor can add it to their system and/or provisioning scripts.

Warner


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Rodney W. Grimes
> On Wed, Sep 22, 2021 at 08:34:58AM -0700, John Baldwin wrote:
> > On 9/22/21 1:36 AM, Baptiste Daroussin wrote:
> > > Hello,
> > > 
> > > TL;DR: this is not a proposal to deorbit csh from base!!!
> > > 
> > > For years now, csh is the default root shell for FreeBSD, csh can be 
> > > confusing
> > > as a default shell for many as all other unix like settled on a bourne 
> > > shell
> > > compatible interactive shell: zsh, bash, or variant of ksh.
> > > 
> > > Recently our sh(1) has receive update to make it more user friendly in
> > > interactive mode:
> > > * command completion (thanks pstef@)
> > > * improvement in the emacs mode, to make it behave by default like other 
> > > shells
> > > * improvement in the vi mode (in particular the vi edit to respect 
> > > $EDITOR)
> > > * support for history as described by POSIX.
> > > 
> > > This makes it a usable shell by default, which is why I would like to 
> > > propose to
> > > make it the default shell for root starting FreeBSD 14.0-RELEASE (not 
> > > MFCed)
> > > 
> > > If no strong arguments has been raised until October 15th, I will make 
> > > this
> > > proposal happen.
> > > 
> > > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!
> > 
> > I think this is fine.  I would also be fine with either removing 'toor' 
> > from the
> > default password file or just leaving it as-is for POLA.  (I would probably
> > prefer removing it outright.)
> 
> HardenedBSD recently removed toor. No one has complained (yet?). A
> small Twitter poll[0] showed that 85% of people who responded do not
> use toor.

A truely disastisified customer does not complain, they simply
go some place else for there products.  Be carefull in what you
believe silence to be saying.

> 
> [0]: https://twitter.com/HardenedBSD/status/1415781911063056389
> 
> Thanks,
> 
> -- 
> Shawn Webb
> Cofounder / Security Engineer
> HardenedBSD
> 
> https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc

-- 
Rod Grimes rgri...@freebsd.org



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Shawn Webb
On Wed, Sep 22, 2021 at 08:34:58AM -0700, John Baldwin wrote:
> On 9/22/21 1:36 AM, Baptiste Daroussin wrote:
> > Hello,
> > 
> > TL;DR: this is not a proposal to deorbit csh from base!!!
> > 
> > For years now, csh is the default root shell for FreeBSD, csh can be 
> > confusing
> > as a default shell for many as all other unix like settled on a bourne shell
> > compatible interactive shell: zsh, bash, or variant of ksh.
> > 
> > Recently our sh(1) has receive update to make it more user friendly in
> > interactive mode:
> > * command completion (thanks pstef@)
> > * improvement in the emacs mode, to make it behave by default like other 
> > shells
> > * improvement in the vi mode (in particular the vi edit to respect $EDITOR)
> > * support for history as described by POSIX.
> > 
> > This makes it a usable shell by default, which is why I would like to 
> > propose to
> > make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)
> > 
> > If no strong arguments has been raised until October 15th, I will make this
> > proposal happen.
> > 
> > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!
> 
> I think this is fine.  I would also be fine with either removing 'toor' from 
> the
> default password file or just leaving it as-is for POLA.  (I would probably
> prefer removing it outright.)

HardenedBSD recently removed toor. No one has complained (yet?). A
small Twitter poll[0] showed that 85% of people who responded do not
use toor.

[0]: https://twitter.com/HardenedBSD/status/1415781911063056389

Thanks,

-- 
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc


signature.asc
Description: PGP signature


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread John Baldwin

On 9/22/21 1:36 AM, Baptiste Daroussin wrote:

Hello,

TL;DR: this is not a proposal to deorbit csh from base!!!

For years now, csh is the default root shell for FreeBSD, csh can be confusing
as a default shell for many as all other unix like settled on a bourne shell
compatible interactive shell: zsh, bash, or variant of ksh.

Recently our sh(1) has receive update to make it more user friendly in
interactive mode:
* command completion (thanks pstef@)
* improvement in the emacs mode, to make it behave by default like other shells
* improvement in the vi mode (in particular the vi edit to respect $EDITOR)
* support for history as described by POSIX.

This makes it a usable shell by default, which is why I would like to propose to
make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)

If no strong arguments has been raised until October 15th, I will make this
proposal happen.

Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!


I think this is fine.  I would also be fine with either removing 'toor' from the
default password file or just leaving it as-is for POLA.  (I would probably
prefer removing it outright.)

--
John Baldwin



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Renato Botelho

+1 for keeping this behavior on default config

On 22/09/21 06:19, Daniel Morante via freebsd-current wrote:
Will history/completion continue to work the same way? (for example 
typing part of the command, pressing UP and having it complete based on 
history)


On 9/22/2021 4:36 AM, Baptiste Daroussin wrote:

Hello,

TL;DR: this is not a proposal to deorbit csh from base!!!

For years now, csh is the default root shell for FreeBSD, csh can be 
confusing
as a default shell for many as all other unix like settled on a bourne 
shell

compatible interactive shell: zsh, bash, or variant of ksh.

Recently our sh(1) has receive update to make it more user friendly in
interactive mode:
* command completion (thanks pstef@)
* improvement in the emacs mode, to make it behave by default like 
other shells
* improvement in the vi mode (in particular the vi edit to respect 
$EDITOR)

* support for history as described by POSIX.

This makes it a usable shell by default, which is why I would like to 
propose to
make it the default shell for root starting FreeBSD 14.0-RELEASE (not 
MFCed)


If no strong arguments has been raised until October 15th, I will make 
this

proposal happen.

Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!

Best regards,
Baptiste






--
Renato Botelho



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Piotr P. Stefaniak

On 2021-09-22 10:36:45, Baptiste Daroussin wrote:


Recently our sh(1) has receive update to make it more user friendly in
interactive mode:
* command completion (thanks pstef@)
* improvement in the emacs mode, to make it behave by default like other shells
* improvement in the vi mode (in particular the vi edit to respect $EDITOR)
* support for history as described by POSIX.


There are also prompt-related commits done by trasz:
r342577 Make sh(1) collapse $HOME into "~" in PS1
r342576 Simplify the way we set the default sh(1) PS1
r342645 Add current working directory to the default sh prompt
r342812 Give sh(1) a proper default prompt instead of just "$".
r342881 Make sh(1) recognize the default $HOME
r343231 Don't mess with BLOCKSIZE in shell startup files
r343399 Make sh(1) support \u in PS1
r343416 Install .shrc for root, and set PS1 for the toor account.

and this commit by me:
r363621 sh(1): print a newline when ^D quits sh

What I would like to see by default are these ctrl-arrow bindings in
emacs mode and an alias for "history":
bind "\\e[1;5C" em-next-word
bind "\\e[1;5D" ed-prev-word
alias history='fc -l'

Piotr



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Mariusz Zaborski
+1 from me.

On Wed, 22 Sept 2021 at 12:31, Chris Stephan  wrote:

> I completely agree. It will save me the ‘/bin/sh’ at the beginning of each
> ‘su -‘ session. Also, it will simplify building extra small FreeBSD images,
> allowing an easier removal of ‘csh’.
>
> I use csh from time to time, but I do wish it would take a much more
> explicit action so my brain has switched over to ‘csh mode’. I won’t lie
> that I’ve pasted script into my terminal and spent time troubleshooting why
> the commands didn’t work only to realize I forgot to change to /bin/sh
> first.
>
> Chris Stephan
>
> Sent from FreeBSD
> 
> From: owner-freebsd-curr...@freebsd.org 
> on behalf of Baptiste Daroussin 
> Sent: Wednesday, September 22, 2021 3:36:45 AM
> To: curr...@freebsd.org ; a...@freebsd.org
> 
> Subject: [HEADSUP] making /bin/sh the default shell for root
>
> Hello,
>
> TL;DR: this is not a proposal to deorbit csh from base!!!
>
> For years now, csh is the default root shell for FreeBSD, csh can be
> confusing
> as a default shell for many as all other unix like settled on a bourne
> shell
> compatible interactive shell: zsh, bash, or variant of ksh.
>
> Recently our sh(1) has receive update to make it more user friendly in
> interactive mode:
> * command completion (thanks pstef@)
> * improvement in the emacs mode, to make it behave by default like other
> shells
> * improvement in the vi mode (in particular the vi edit to respect $EDITOR)
> * support for history as described by POSIX.
>
> This makes it a usable shell by default, which is why I would like to
> propose to
> make it the default shell for root starting FreeBSD 14.0-RELEASE (not
> MFCed)
>
> If no strong arguments has been raised until October 15th, I will make this
> proposal happen.
>
> Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!
>
> Best regards,
> Baptiste
>
>


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Chris Stephan
I completely agree. It will save me the ‘/bin/sh’ at the beginning of each ‘su 
-‘ session. Also, it will simplify building extra small FreeBSD images, 
allowing an easier removal of ‘csh’.

I use csh from time to time, but I do wish it would take a much more explicit 
action so my brain has switched over to ‘csh mode’. I won’t lie that I’ve 
pasted script into my terminal and spent time troubleshooting why the commands 
didn’t work only to realize I forgot to change to /bin/sh first.

Chris Stephan

Sent from FreeBSD

From: owner-freebsd-curr...@freebsd.org  on 
behalf of Baptiste Daroussin 
Sent: Wednesday, September 22, 2021 3:36:45 AM
To: curr...@freebsd.org ; a...@freebsd.org 

Subject: [HEADSUP] making /bin/sh the default shell for root

Hello,

TL;DR: this is not a proposal to deorbit csh from base!!!

For years now, csh is the default root shell for FreeBSD, csh can be confusing
as a default shell for many as all other unix like settled on a bourne shell
compatible interactive shell: zsh, bash, or variant of ksh.

Recently our sh(1) has receive update to make it more user friendly in
interactive mode:
* command completion (thanks pstef@)
* improvement in the emacs mode, to make it behave by default like other shells
* improvement in the vi mode (in particular the vi edit to respect $EDITOR)
* support for history as described by POSIX.

This makes it a usable shell by default, which is why I would like to propose to
make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)

If no strong arguments has been raised until October 15th, I will make this
proposal happen.

Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!

Best regards,
Baptiste



Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Marek Zarychta
W dniu 22.09.2021 o 10:36, Baptiste Daroussin pisze:
> Hello,
> 
> TL;DR: this is not a proposal to deorbit csh from base!!!
> 
> For years now, csh is the default root shell for FreeBSD, csh can be confusing
> as a default shell for many as all other unix like settled on a bourne shell
> compatible interactive shell: zsh, bash, or variant of ksh.
> 
> Recently our sh(1) has receive update to make it more user friendly in
> interactive mode:
> * command completion (thanks pstef@)
> * improvement in the emacs mode, to make it behave by default like other 
> shells
> * improvement in the vi mode (in particular the vi edit to respect $EDITOR)
> * support for history as described by POSIX.
> 
> This makes it a usable shell by default, which is why I would like to propose 
> to
> make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)
> 
> If no strong arguments has been raised until October 15th, I will make this
> proposal happen.
> 
> Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!
> 
> Best regards,
> Baptiste
>

Is /bin/csh going to become default toor's default shell since then?

-- 
Marek Zarychta



OpenPGP_signature
Description: OpenPGP digital signature


Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Baptiste Daroussin
On Wed, Sep 22, 2021 at 05:19:38AM -0400, Daniel Morante via freebsd-current 
wrote:
> Will history/completion continue to work the same way? (for example typing
> part of the command, pressing UP and having it complete based on history)

No, this is a csh specific behaviour. (not it can probably be doable via
.shrc, but I haven't checked)

Best regards,
Bapt
> 
> On 9/22/2021 4:36 AM, Baptiste Daroussin wrote:
> > Hello,
> > 
> > TL;DR: this is not a proposal to deorbit csh from base!!!
> > 
> > For years now, csh is the default root shell for FreeBSD, csh can be 
> > confusing
> > as a default shell for many as all other unix like settled on a bourne shell
> > compatible interactive shell: zsh, bash, or variant of ksh.
> > 
> > Recently our sh(1) has receive update to make it more user friendly in
> > interactive mode:
> > * command completion (thanks pstef@)
> > * improvement in the emacs mode, to make it behave by default like other 
> > shells
> > * improvement in the vi mode (in particular the vi edit to respect $EDITOR)
> > * support for history as described by POSIX.
> > 
> > This makes it a usable shell by default, which is why I would like to 
> > propose to
> > make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)
> > 
> > If no strong arguments has been raised until October 15th, I will make this
> > proposal happen.
> > 
> > Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!
> > 
> > Best regards,
> > Baptiste
> > 
> 





Re: [HEADSUP] making /bin/sh the default shell for root

2021-09-22 Thread Daniel Morante via freebsd-current
Will history/completion continue to work the same way? (for example 
typing part of the command, pressing UP and having it complete based on 
history)


On 9/22/2021 4:36 AM, Baptiste Daroussin wrote:

Hello,

TL;DR: this is not a proposal to deorbit csh from base!!!

For years now, csh is the default root shell for FreeBSD, csh can be confusing
as a default shell for many as all other unix like settled on a bourne shell
compatible interactive shell: zsh, bash, or variant of ksh.

Recently our sh(1) has receive update to make it more user friendly in
interactive mode:
* command completion (thanks pstef@)
* improvement in the emacs mode, to make it behave by default like other shells
* improvement in the vi mode (in particular the vi edit to respect $EDITOR)
* support for history as described by POSIX.

This makes it a usable shell by default, which is why I would like to propose to
make it the default shell for root starting FreeBSD 14.0-RELEASE (not MFCed)

If no strong arguments has been raised until October 15th, I will make this
proposal happen.

Again just in case: THIS IS NOT A PROPOSAL TO REMOVE CSH FROM BASE!

Best regards,
Baptiste





smime.p7s
Description: S/MIME Cryptographic Signature