Did you enter the shell into /etc/shells. It seems that Mac OS manages the valid shells in there. I can't tell exactly because I'm not on Mac
As Norbert says, I think the answer is in /etc/shells. Mine has this:
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
Add /opt/local/bin/zsh
to that list, and you should be fine. You should then be able to change the shell (individually for each user) using chsh
.
I know this question was marked answered, but
/opt/local/var/macports/software/zsh/4.2.7_0+mp_completion
is not even an executable file in macports. That's why you got the error. Shells must be executable.
You wanted to set your shell to /opt/local/bin/zsh .
This worked for me both in Leopard and in snow leopard. OSX does not actually use /etc for configuration management, it uses NetInfo ( Leopard ) and now it uses Directory Services ( Snow Leopard) . You wanted to set that in by right clicking on your user in System Preferences > Accounts,( S.L.) or by using Netinfo Manager (Leopard)
EDIT:
Snow Leopard: sudo dscl . -create /Users/chiggsy UserShell /opt/local/bin/zsh
(create creates or updates )
EDIT: Please picture me covered in foul, stinking shame. I'm using iTerm, and changing the shell in my account worked flawlessly. In Terminal, I got the same result as the OP, and fixed it by editing /etc/shells. Now, it seems to me that I should not be able to bypass the /etc/shells restriction by simply using a 3rd party terminal, but it seems that is the case.