On Mac OS X, we can specify network account Server in the Users & Groups settings to open the login for the network accounts. However, there was a problem when I tried to modify the default shell of the network account from bash to zsh.
The direct execution of the CHSH command opens the following content in the default editor:
# Changing user information for Rzeng.
# use ' passwd ' to change the password.
##
# Open Directory:/active directory/xxxx/xxxx.com
##
Shell:/bin/bash
Full Name:rong Zeng
Office Location:
Office Phone:
Home Phone:
When you edit the value of the shell: the save appears with this hint:
Chsh:operation is denied because the current credentials does not have the appropriate privileges. Operation is denied because the current credentials does not have the appropriate privileges.
Chsh:no Changes made
Using sudo chsh-s/bin/zsh directly, you will also receive the same hint.
According to how do I change a users default shell in OS X? mentioned, hold down the CTRL key to click the user name displayed in user & Groups, Advanced Options will appear ... option in which you can set the default shell.
However, network account does not have Advanced Options, and other users have them.
Finally, this question and answer through the curve of saving the way to solve the problem: Chsh doesn ' t change $SHELL.
The method is very simple, the operating system is not to change it? Then just change the application directly!
I'm using Iterm.app instead of the default Terminal. The following settings allow Iterm.app to start automatically when the zsh is started.
Click Iterm.app-> Preferences-> Profiles-> General-> Command;
Set Command: The value is/bin/zsh.
In fact, if not afraid of trouble, after starting the shell, and then typing zsh return can achieve the same effect.