Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to change my default shell to bash in freebsd. I tried the following:

1.chsh -s /bin/bash (or /usr/local/bin/bash) <my_username>

I get this error after entering the password: chsh: yppasswd_remote(): NIS password update failed

2.Added exec /bin/bash --login to my .profile file. But tcsh is still the default shell even after logging out and logging in.

Can you please let me know if anything else needs to be done? Thanks in advance.

share|improve this question

migrated from Jan 30 '13 at 22:35

This question came from our site for professional and enthusiast programmers.

Make sure /usr/local/bin/bash (or the path to your bash) is in /etc/shells. Chsh only allows changing to a shell on the allowed shell list.

Also, .profile is for Bourne shells, not c-shells like tcsh. Your hack should probably have used .cshrc.

share|improve this answer

You can use vipw (# man vipw) to edit your passwd file correctly. After run it change your default shell located at end of line.

share|improve this answer

You can use "vipw" tool to edit user's shell.

You should change user's shell section: /usr/local/bin/bash. For instance:

aokan:*:1002:3024::0:0:User &:/home/pgsql:/usr/local/bin/bash

Make sure bash installed:

pkg_info |grep bash
share|improve this answer

you can edit your passwd file and in front of your username type the default bash of yours like:


change /bin/sh to where your bash is located.

share|improve this answer
Don't ever directly edit that file with anything other than vipw. – 0xC0000022L Feb 19 '14 at 12:28

You must log in to answer this question.