Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Jan 30 '13 at 22:35

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

add comment

4 Answers

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
add comment

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
add comment

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

http://www.unix.com/man-page/FreeBSD/8/vipw/

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
add comment

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

news:x:9:9:news:/var/spool/news:/bin/sh

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 at 12:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.