Bash prompt issue when logging in via SSH
I'm wondering if someone can shed light on this for me:
When I log into my Fedora17 box using SSH as the user "tommy", I get an unexpected command line prompt from bash. When I SSH in as "johnny" I get a more conventional prompt. I looked at the files .bashrc and .bash_profile in each user's home directory to see if I could identify what is different; however, they appear to be the same. I don't see where else the prompt variable is set. Normally, I use "tommy" as the user account that I remotely access via SSH. This prompt is not helpful to me. Below is the output I get from Putty when I log in as each user. Code:
Using username "tommy". Code:
Using username "johnny". |
post tommy's .bashrc?
|
I think tommy user's login shell is set to /bin/sh instead of /bin/bash.
Code:
grep tommy /etc/passwd Code:
chsh tommy |
Quote:
Why do I assume everyone uses bash? </rhethorical_Q> :) Thanks mandyapenguin! |
Quote:
I have ever seen as where there is no usernmae, hostname and pwd info (like [johnny@server ~]$) after logged in and also there is no command completion while we are using shell as /bin/sh. So I am guessing about login shell. |
Wow, thanks for the help! Just looking at your suggestions and looking in the home directories of each lead me to discover that tommy had no .bashrc file at all. For completeness, here are the results of the various commands:
Code:
-bash-4.2$ ls -al Code:
[johnny@server ~]$ grep johnny /etc/passwd Code:
Using username "tommy". |
Quote:
See http://www.linuxquestions.org/questi...9/#post2914160 for details. NOTE: root will need these files (/root/.bash_profile and /root/.bashrc) created also. :) Please let us know... |
Well, I guess I need to do a better job of searching...both here and on my own system. I should have noticed that the .bashrc file was missing for tommy. Root had it already, and so did johnny. I'm not sure how it got that way, but I learned some more about bash today. The link you provided would have been a good thread for me to have read before posting.
Thanks again to Habitual and mandyapenguin for your assistance. Best regards to all... (BTW, I didn't see an obvious way to mark this as solved; I'm not sure that matters on LQ Forum) |
All times are GMT -5. The time now is 11:54 AM. |