Contents
Is it possible to make zsh the default shell?
Scenario 2 is the only reason to actually change the default shell (it’s too restrictive). I do not think the provided answer actually makes zsh the default shell. It simple changes the shell to zsh as soon as user logs in to his/her default shell.
Why does CHSH not work in a restricted shell?
Many commands have shell escapes which can be used to escape a restricted shell and regain access to chsh. chsh really doesn’t work because of some other reason. solution a from possibility 1 is an answer here as well. Scenario 2 is the only reason to actually change the default shell (it’s too restrictive).
How to get access to CHSH in Bash?
Once /bin is in the path, you can then start bash from inside rsh/rbash, gaining access to the chsh command to let you change shells. Many commands have shell escapes which can be used to escape a restricted shell and regain access to chsh.
Why does CHSH not work with admin privileges?
If you can’t run chsh because you don’t have admin privileges, talk to someone who does. Most likely you can’t use chsh as non-root because the system you’re using is configured so that chsh wouldn’t work, for example because the system uses NIS or LDAP rather than just the /etc/passwd file.
How can I change my shell without root?
After the installation is completed, you can change the default shell using the chsh command: This should also work without root access if your user is listed in the file /etc/passwd; however, if this is not the case, you will need root access to add your username to the file.
Is it possible to run zsh without root?
If the machine has zsh on it you should be fine to just execute zsh on a prompt to swap, if that works you can either try chsh to swap your shell (should work without root) or when you’re connecting with ssh put ssh -t hostname zsh to start it automatically.
Which is the best way to install zsh?
The basic idea is to use exec to replace the current shell with zsh. Often you can do this in a login file such as .profile (if your shell is sh or ksh) or .login (if it’s csh). Make sure you have some way of altering the file (e.g. via FTP) before you try this as exec is often rather unforgiving.