Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 242
Elan Avatar asked Dec 07 '25 21:12

Elan


1 Answers

In your .bashrc, put exec tcsh last.

like image 120
bos Avatar answered Dec 10 '25 12:12

bos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!