MacOS catalina ignores shell in AD and uses zsh instead

active-directorybashcatalinacommand linemacos

We have Catalina hosts connected to our AD domain. Directory Utility shows AD users having /bin/bash as their shell (in Directory Editor), and the default shell for the domain is /bin/bash (in Services -> User Experience). However, when I log in, Catalina ignores both and instead logs me in with zsh.

How do I get Catalina to honor the shell preference from AD?

Best Answer

The instructions for enforcing a default shell for users in macOS Catalina through Active Directory is available at Apple: https://support.apple.com/guide/directory-utility/set-a-unix-active-directory-user-accounts-diru34cb1e36/mac

Here's the procedure to manually update the shell (independently of any AD setting):

If the computer a natively installed with Catalina, then all user accounts will use zsh.

If the computer was upgraded to Catalina, then:

  • all existing accounts will use bash and will see a warning that zsh is now the preferred shell in macOS.

  • all newly created accounts will use zsh

If a user wants to change their default shell environment from zsh to bash, the following command can be issued at the command line prompt in Terminal.app:

chsh -s /bin/bash

You can also change the default shell via System PreferencesUsers & Groups. First unlock the padlock at the bottom-left, then control-click the user to edit and chose "Advanced options..." from the popup context menu. Edit the Login shell property by selecting the shell from the drop-down control.