LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   whats this bash prompt? (https://www.linuxquestions.org/questions/linux-general-1/whats-this-bash-prompt-564624/)

sachinh 06-26-2007 12:16 PM

whats this bash prompt?
 
We have RedHat Linux 4.0 version.
When a particular user say abc logs in to his account , he lands into something like this.

-bash-3.00$
/home/abc

Dont know what the problem is. Rest is all fine with that user. But just wonder why is he getting this prompt. Note that for all the users , we get proper shell prompt . Eg.

For a user test , when he logs in , he gets,

[test@SERVER ~]$
/home/test


Any idea what it is ??

justsimran 06-26-2007 01:29 PM

1. CHeck this file /etc/passwd
is this user "abc" having the /bin/bash shell or not....
seems like it is not getting the shell,,,

2.check this file and let us knw....

Agrouf 06-26-2007 05:09 PM

You should also check environment variable $PS1 and how does .profile set this variable.

sachinh 06-27-2007 10:52 AM

Checked the passwd file ...it was proper. I mean the user has been assigned /bin/bash shell.

Secondly when I checked , the user home directory did not contain any .bash_profile or .bashrc file in it. So I transferred the same from other users home directory. And the problem got fixed. Dunno how come it happened though.
Anyways thanx for everything.!!!!!!

timmeke 06-28-2007 08:51 AM

As Agrouf pointed out, the $PS1 (and/or $PS2 & $PS3) environment variables are obviously set in the bashrc/profile files that you copied from another user. These variables ultimately control what the prompt looks like (for Bash shells at least).

Try checking "man bash" for details on PS1 and prompting.


All times are GMT -5. The time now is 12:29 PM.