How do I set the shell in Solaris/SunOS for my user only, without access to /etc/passwd or any other su stuff?It should thereafter work both for interactive ssh (1) and ssh when you send commands (2).uname -a says SunOS ... 5.10 Generic_148889-04 i86pc i386 i86pcEdit in response to comments and answersThere is no chsh.I can't do /usr/bin/passwd -e - permission denied.The default shell is bash. I would like zsh.I already tried to set the SHELL environment variable manually, and start the shell manually in the .profile file, only this doesn't work for my second case (2): ssh user@host command will run command in bash.As compared to getting my preferred shell when I login, it is minor, so the workaround is certainly worth mentioning, only, my intention with this question was to get it right the right way. Because it just relates to one user, I thought it was doable without involving the SA, but now I'm less certain. (But any workaround that solves (1) and (2) is cool, for sure.)
change shell in Solaris/SunOS for your user only wihtout access to /etc/passwd
shell;ssh;solaris
The SHELL=newshell; exec $SHELL trick has already been covered.Now, if you also want commands run over ssh to use your new shell. If the current login shell is bash, you can add this to your ~/.bashrc:if [ -n $BASH_EXECUTION_STRING ]; then  export SHELL=/bin/zsh  exec $SHELL -c $BASH_EXECUTION_STRINGfiThat will execute something with the new shell whenever bash is started with bash -c something and it reads ~/.bashrc.Shells started with bash -c something generally do not read the ~/.bashrc. An exception is when those bash are called by sshd or rshd, or upon bash -ic something.You could add a check for [ -n $SSH_CONNECTION ] if you only want to cover the ssh case.