Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
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
add comment

1 Answer

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
fi
share|improve this answer
add comment

Your Answer

 
discard

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

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