I have an Amazon EC2 Machine running Ubuntu 10.04.
The default user, ubuntu's .bashrc seems to be behaving properly, but if I ssh or su to the second user, Kunsan, it doesn't display properly until I run bash:
Ex 1.) Changing user with su
[email protected] ~$ ssh [email protected][email protected]:~$[email protected]:~$ su kunsan$ $ bash[email protected]: $
[email protected] ~$ ssh [email protected]
[email protected]:~$
[email protected]:~$ su kunsan
$
$ bash
[email protected]: $
Ex 2.) SSH-ing indirectly as the user
[email protected] ~$ ssh [email protected]/home/kunsan/.bashrc: 13: shopt: not found/home/kunsan/.bashrc: 21: shopt: not found/home/kunsan/.bashrc: 99: shopt: not found/etc/bash_completion: 33: [[: not found/etc/bash_completion: 39: [[: not found/etc/bash_completion: 52: Bad substitution\[\e]0;\[email protected]\h: \w\a\]\[email protected]\h:\w$\[\e]0;\[email protected]\h: \w\a\]\[email protected]\h:\w$ bash[email protected]:~$
/home/kunsan/.bashrc: 13: shopt: not found
/home/kunsan/.bashrc: 21: shopt: not found
/home/kunsan/.bashrc: 99: shopt: not found
/etc/bash_completion: 33: [[: not found
/etc/bash_completion: 39: [[: not found
/etc/bash_completion: 52: Bad substitution
\[\e]0;\[email protected]\h: \w\a\]\[email protected]\h:\w$
\[\e]0;\[email protected]\h: \w\a\]\[email protected]\h:\w$ bash
I've tried playing around with ~/.profile and ~/.bash_login to include
if [ -f ~/.bashrc ]; then . ~/.bashrcFi
if [ -f ~/.bashrc ]; then
. ~/.bashrc
Fi
but so far, nothing has seemed to do the trick.
You can try to change it with this command, where /bin/bash is the location of bash
usermod -s /bin/bash kunsan