Changing default login shell

Hi everybody,

The problem is quite simple, I want to change my default shell which is /bin/csh to /bin/bash. I have looked online for solutions to my problem, but to no avail.

I have tried chsh, but it tells me this:

chsh: can only change local entries; use ypchsh instead.

I use ypchsh, but I get:

ypchsh: can't get local yp domain: Local domain name not set

I looked at /etc/passwd, and I don't have an entry in this file.

However when I do, getent passwd d.tang

d.tang:x:10948:20004:Dave Tang:/home/d.tang:/bin/csh

I don't have root privileges, but even if I did I don't even know where this information is coming from.

Could someone shed some light on this?

Many thanks,

Dave

PS Currently I just setup .cshrc to say /bin/bash and when that changes my .bashrc and .bash_profile are loaded.

since you have tried chsh, may be chfn, chpass can help, though I am not sure.

Thanks for the reply rakeshawasthi. I don't have the chpass program and I don't know if I can use chfn to change my default login shell.

man chfn

NAME
chfn - change your finger information

SYNOPSIS
chfn [ -f full-name ] [ -o office ] [ -p office-phone ] [ -h home-
phone ] [ -u ] [ -v ] [ username ]

You seem to have solved the problem already.
A root user can change your default shell easily.
The "csh" is rarely used nowadays.

Hi methyl, thanks for the reply and yes I have solved the problem.

However I was interested to see where the information for my default shell is stored. It isn't in /etc/passwd. Is there some way of finding out i.e. finding out where getent passwd d.tang gets its information from?

The solution to this was to contact my system admin, who just changed the global passwd file (which I still don't know where it resides) that my account was reading.

please post the output of

grep passwd /etc/nsswitch.conf

my guess is LDAP.

Hi Frank,

Right you are. The output:

passwd: files ldap

Thanks for the reply! Now I know a little bit more about passwd files.

Dave