Mac computer network account Modification Shell (Chsh) method

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.