7

I'm setting up a new dev Macbook Pro, and trying to replace bash with zsh. I installed zsh and can run it to change shell in a session. When I use

sudo chsh -s /bin/zsh username

I get the error message:

chsh: Operation was denied because the current credentials do not have the appropriate privileges. Operation was denied because the current credentials do not have the appropriate privileges.

AFAIK I have admin privileges on the machine. What could be causing this?

3 Answers 3

2

I ran into this problem a moment ago. I can confirm that /etc/shells listed '/bin/zsh', so David Schwartz's answer did not apply to my case. Macworld has a tip for Mac OS 10.5 and it appears to work for 10.6, too. Let's duplicate the link's info!

To change the login shell of your account in Leopard, do this...

Control-click on your account name in the Accounts pane of System Preferences and choose Advanced Options in the contextual menu that appears (you'll have to unlock the pane first, by clicking the lock icon).

In the resulting Advanced Options screen, either type in the path to your preferred shell, or choose among the various shells already installed in /bin: bash, tcsh, sh, csh, zsh, or ksh. Finally, click on OK.

The note at the top of the Advanced Options screen claims you have to restart for the change to take effect, but you really just need to log out and back in again.

1
  • 1
    In OS X Sierra and the user interface no longer provides this way, it seems. Help! Jun 28, 2017 at 17:14
0

You forgot to update /etc/shells or whatever table similarly lists the set of shells a user is permitted to set.

0

chsh reports "Operation was denied because the current credentials do not have the appropriate privileges." for network accounts too. I had to upgrade user's Active Directory account on my iMac to mobile account to be able to use chsh or Control-click in Users & Groups settings to work.

1
  • 4
    Just learned that deep inside the login options one can set the default shell for all AD network accounts in Users & Groups -> Login Options -> Network Account Server: Edit -> Open Directory Utility... -> select your AD -> double click on Active Directory service -> Show Options -> User Experience Tab -> Default user shell. Dec 8, 2019 at 17:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .