Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 07-11-2001, 06:10 PM   #1
LQ Newbie
Registered: Jul 2001
Location: Wisconsin
Distribution: Redhat 7.1
Posts: 4

Rep: Reputation: 0
bash-2.04#? what happened to root@localhost

Okay, I installed a copy of Redhat 7.1 today, and after that, installed MySQL, Apache, PHP, and Samba, in that order. Now, instead of saying [root@localhost] at the shell, it says bash-2.04.
I dont know why it happened.

How do I revert to my original shell?

Old 07-11-2001, 06:29 PM   #2
Senior Member
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Have a look in /etc/profile for the following lines (or something close), and set them as below.
# Set a default shell prompt:
#PS1='`hostname`:`pwd`# '
if [ "$SHELL" = "/bin/pdksh" -o "$SHELL" = "/bin/ksh" ]; then
 PS1="! $ "
elif [ "$SHELL" = "/bin/zsh" ]; then
 PS1="%n@%m:%~%# "
elif [ "$SHELL" = "/bin/ash" ]; then
 PS1="$ "
 PS1='\u@\h:\w\$ '
PS2='> '
The shell won't have changed much, just the prompt settings.


Old 07-12-2001, 10:47 AM   #3
LQ Newbie
Registered: Jul 2001
Location: Wisconsin
Distribution: Redhat 7.1
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks jharris, I retraced my steps and found out what happened. I access my web server using Samba, logging in as root on my windows machine and mapping a network drive to access the linux box. Problem was, when I logged in with root on the windows machine, it would only let me stay in the /root/ directory, and I couldnt access my web server files.

I did a "usermod -d / root" to change the root's home dir to /, so I could access the full server. After that, I got the bash-2.04# thing, so I reverted the root home back to /root/ and got my original prompt back.

Is there a way to change a user's home directory, and automatically move the files associated with that user?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Root@localhost Problem petenyce Linux - Newbie 1 09-28-2005 09:55 PM
root@localhost:~# xf86config -bash: xf86config: command not found klemen Slackware 17 01-06-2005 02:56 AM
root@localhost t0ker Linux - Newbie 4 09-14-2004 06:38 AM
Terminal : user@localhost => bash-2.05a$ storm Linux - Newbie 3 03-09-2003 05:22 PM
Changing root@localhost to Stingreen Linux - General 14 12-17-2002 06:21 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:27 AM.

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