How to change Linux shell in a remote computer that does not support ypchsh

Elan picture Elan · Mar 30, 2012 · Viewed 7k times · Source

How do I change shell in a remote PC? I am logged into a cluster with a Bash and the output I see is

elan@l01:~ $ chsh
chsh: can only change local entries; use ypchsh instead.
elan@l01:~ $ ypchsh
-bash: ypchsh: command not found

Since I have no root privilege there, I can not install ypchsh in the cluster. Is there any other way to change shell without invoking ypchsh?

Note 1: Browsing, it looks like another user who installed the same software (currently not available for questioning) has .cshrc in his directory, with the right settings. His .bashrc is minimal and has no redirections.

The /etc/passwd has no entry for either of us.

getent passwd

shows entry for both of us, but shows only /bin/bash for both.

Note 2: The sofware has been developed with autotools, and using bash instead of tcsh is known to have created wrong builds. (I am not changing shell because I fancy it.)

Thank you, Elan

Answer

bos picture bos · Mar 30, 2012

In your .bashrc, put exec tcsh last.