Unable to change shell.

Hi. Recently I installed ksh93 and changed this to my default shell.

Now I've installed zsh and would like to make this my default.

Code:
> chsh -s /usr/local/bin/zsh
chsh: /usr/local/bin/ksh93: current shell non-standard

So I manually edited /etc/passwd as root. No change after reboot!

What the hangs going on here?

EDIT: Googling the error return ziltch
 
To edit passwd files, you need to use the vipw(8) utility. Also make sure your shell is listed in /etc/shells.
 
First
[CMD=""]su[/CMD]
to become root, then
[CMD="chsh"]-s /usr/local/bin/zsh your_user[/CMD]
I presume /usr/local/bin/zsh is already listed in /etc/shells, as danger@ stated.
 
If you really are brave and knowledgeable enough to edit your password file manually, at least edit /etc/master.passwd and run [cmd=]pwd_mkdb -p /etc/master.passwd[/cmd] to update /etc/passwd. Better still: use the proper tools, as mentioned above. Never edit /etc/passwd.
 
Thanks.

It's worth pointing out, the handbook's instructions (where I looked in the first place) still involve chsh(1).

http://www.freebsd.org/doc/handbook/shells.html

The easiest way to change your shell is to use the chsh command. Running chsh will place you into the editor that is in your EDITOR environment variable; if it is not set, you will be placed in vi. Change the “Shell:” line accordingly.

You can also give chsh the -s option; this will set your shell for you, without requiring you to enter an editor. For example, if you wanted to change your shell to bash, the following should do the trick:

% chsh -s /usr/local/bin/bash

Just to confirm: the handbook is incorrect?
 
No, chsh(1) is just fine:

As a user:
Code:
$ chsh -s /usr/local/bin/bash                                                                                            
Password: 
chsh: user information updated
or as root:
Code:
# chsh -s /usr/local/bin/bash someuser                                                                                                        
chsh: user information updated

Of course, /usr/local/bin/bash must exist, and it must be listed in /etc/shells. That goes for zsh, mksh, or any other shell as well.
 
Back
Top