Default shell change: Preemptively Answered Questions

Intended audience: GNU/Linux users at Newcastle University.

NUIT are changing the default shell at my request so I’m going to explain why I’ve asked for this change and how it will ultimately make things better all around.

I already have an IT account. Will my default shell change?
No, this change will only affect new users.
Why is NUIT changing the default shell for all new users?
Many NUIT Linux systems, such as Aidan, use the setting stored in Active Directory (aka AD) to set the user’s shell. For most users, that’s /bin/sh. /bin/sh resolves inconsistently across distros, and does so in a way that is not immediately apparent: if you run echo $0 in a Sh session, the result is sh and if you run which sh you get /bin/sh. The only way to tell what Sh really is on your system is by running man sh and seeing what manual you get. This is not user-friendly, it’s not helpdesk-friendly, and it’s certainly not script-friendly. On my Ubuntu daily driver, man sh gives the manual for Dash. On Topsy running Rocks, the same command shows the Bash manual. Aidan, running CentOS 7.5, uses Bash. Setting the default shell in AD to Bash means that you will get Bash every time you login to a Linux system that relies on that AD setting, and echo $0 will say /bin/bash so your scripts can test the current shell meaningfully.
Does this unpredictability of what Sh resolves to actually matter?
Yes! The varied feature support between shells means that scripts written for Bash may not work in Dash or Ksh. Interactive features, such as tab completion, vary, causing cognitive friction every time you log onto a different Linux system. Your user experience should be consistent across systems as far as reasonably possible.
Why Bash and not Csh/Fish/$MYFAVOURITESHELL?
Bash is a sensible default that most users are familiar with, even if it’s not their favourite shell. Most modern Linux systems set Bash as the default shell, so someone who has used a Pi or set up Linux at home is likely to know how to use Bash. All NUIT Linux systems have Bash available.
But some NUIT Linux services already use a non-Sh shell! AKA “I have a managed Linux desktop from my School’s IT team and it has Tcsh, why is that?” AKA “You’re wrong, Rocket uses Bash already.”
School-based IT teams and the Rocket team have decided to ignore the shell setting from Active Directory and are overriding it on a per-machine basis. This is a workaround to make sure that users get a specific known shell, but it affects only the machine it’s applied to and affects everyone on that machine. One of the reasons why NUIT are changing the default AD shell setting to Bash is so that we don’t have to do this workaround any more, and so that you can set your shell once in AD and have that preference apply to all the machines you use.
I have an existing IT account and don’t want Sh, can I change it? I don’t like Bash, can I have something else?
Sure. Until 10am on 19th August you can fill in my online form to request a shell change. After that, you will need to file a Service Desk request.
If I request that you change my default shell in AD, will it affect my desktop Linux PC?
This depends on how your PC is set up. If your PC overrides the AD setting, you will see no change. Ask your local IT staff for advice.
Why can’t I just run chsh to change my shell?
chsh won’t work with networked logins because your account doesn’t exist in the local /etc/passwd. From my original request ticket:

I note that Aidan gives me /bin/sh and I can’t change it on there:
-sh-4.2$ chsh -s /bin/bash
Changing shell for redacted.
Password:
chsh: user "redacted" does not exist. # because I rightly don't exist in /etc/passwd

Will I be able to set my own shell without raising a ticket?
We hope to enable this in the future, but no promises.