LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-26-2007, 12:16 PM   #1
sachinh
Member
 
Registered: Jul 2004
Location: india
Distribution: RH
Posts: 189

Rep: Reputation: 30
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 ??
 
Old 06-26-2007, 01:29 PM   #2
justsimran
Member
 
Registered: Mar 2007
Location: Aus
Distribution: RHEL-4,5,UBUNTU,SUSE,FEDORA-6,7
Posts: 109

Rep: Reputation: 15
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....
 
Old 06-26-2007, 05:09 PM   #3
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
You should also check environment variable $PS1 and how does .profile set this variable.
 
Old 06-27-2007, 10:52 AM   #4
sachinh
Member
 
Registered: Jul 2004
Location: india
Distribution: RH
Posts: 189

Original Poster
Rep: Reputation: 30
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.!!!!!!
 
Old 06-28-2007, 08:51 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What to do at the bash-prompt? daav Linux - Newbie 2 10-18-2006 03:52 AM
Bash prompt Hoofty Linux - General 1 03-15-2006 04:54 PM
bash prompt subG Slackware 6 01-18-2006 04:43 PM
help with bash prompt everythingand2 Linux - Newbie 7 12-06-2003 04:28 PM
Bash Prompt mandraketux Mandriva 2 11-28-2003 10:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration