On a server which thousands of users loginto the admins seem to have neglected some basics. My default shell is csh I would like to use bash, but chsh errors because /etc/shells does not exist. To make things worse my second thought was usermod, which is unavailable on the machine.

The obvious solution is to create /etc/shells but I am not an admin and they seem to be unresponsive to such matters.

Is there a way to set my default shell other than using chsh or usermod? If not is there something better than running /usr/bin/bash -l every time I log in?

  • 3
    Did you try adding /usr/bin/bash -l to your ~/.csh_profile? – mtahmed Feb 25 '13 at 17:22
  • No, unless you convince/bribe a sysamdin to change your user entry. – vonbrand Feb 25 '13 at 19:47

Make csh transfer control to bash when you log in. Put this in your .login:

if ($?prompt == 0) then
  : # non-interactive shell, be conservative
else if (-x /usr/bin/bash) then
  exec /usr/bin/bash --login

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.