Problem with terminal, OS 10.5.8

macuser099

macrumors newbie
Original poster
May 24, 2013
8
0
USA
When I open terminal, instead of the first line listing the default:
ComputerName:CurrentDirectory User$

there is a site listed before my username:
http://thissite: ~User$

What can I do to fix this? And can anyone explain why this is present when I open a shell?
 

MacUser2525

macrumors 68000
Mar 17, 2007
1,821
211
Canada
When I open terminal, instead of the first line listing the default:
ComputerName:CurrentDirectory User$

there is a site listed before my username:
http://thissite: ~User$

What can I do to fix this? And can anyone explain why this is present when I open a shell?
Someone has set the PS1 variable to show the address of the box look in your .bash_profile file, in your home directory as it is a hidden file, for the current setting and if you wish to make changes to it that is where to do it.
 

macuser099

macrumors newbie
Original poster
May 24, 2013
8
0
USA
.bash_profile

I have a .bash_history file, but no .bash_profile. I am not sure what line(s) to change because their is no mention of http://thissite. Any further help? I appreciate you pointing me in this direction.
 

MacUser2525

macrumors 68000
Mar 17, 2007
1,821
211
Canada
I have a .bash_history file, but no .bash_profile. I am not sure what line(s) to change because their is no mention of http://thissite. Any further help? I appreciate you pointing me in this direction.
Could be in your .bashrc you would see something like PS1="....." if you want to see what it is set to now use echo $PS1.
 

macuser099

macrumors newbie
Original poster
May 24, 2013
8
0
USA
terminal

echo PS1 returned this:


\h:\W \u\$

I am not sure what to do. A search for other .bash$ files did not return anything.
 

Nermal

Moderator
Staff member
Dec 7, 2002
18,704
1,192
New Zealand
echo PS1 returned this:


\h:\W \u\$

I am not sure what to do. A search for other .bash$ files did not return anything.
That's normal. I don't think this is an issue with your system but rather the network; when I take my machine to work it comes up with something like "blackberry7DF4:~" but the moment I disconnect from the network it's back to normal.

It doesn't seem to affect anything.
 

macuser099

macrumors newbie
Original poster
May 24, 2013
8
0
USA
terminal problems

I disconnected and the problem vanished. After reconnecting it does the same thing. Stumped.

----------

Also when remote login is checked, it states:

"To login to this computer remotely, type "ssh myusername@http://thissite.com"."

I turned remote login off as well, and it appears once again when remote login is on.
 

mrichmon

macrumors 6502a
Jun 17, 2003
873
2
When I open terminal, instead of the first line listing the default:
ComputerName:CurrentDirectory User$

there is a site listed before my username:
http://thissite: ~User$

What can I do to fix this? And can anyone explain why this is present when I open a shell?
By default OS X user accounts are configured so that the default shell "bash" shows the name of the computer (the hostname) and the current directory.

It looks like your hostname has been changed to the string "http://thissite:".

To check, run the command "hostname" in a terminal without the quotes. This command will print the current name of the computer. On OS X, most users set the hostname in System Preferences->Sharing-> "Computer Name:".

----------

Also when remote login is checked, it states:

"To login to this computer remotely, type "ssh myusername@http://thissite.com"."

I turned remote login off as well, and it appears once again when remote login is on.
Looks like a DNS poison attach that is trying to trick you into attempting to login to the URL with your username. If you try that the attacker will be able to capture your username, password, and the IP of your machine.

Powering off your router and your laptop at the same time then powering them back on is likely to resolve the problem.
 

macuser099

macrumors newbie
Original poster
May 24, 2013
8
0
USA
terminal problems

By default OS X user accounts are configured so that the default shell "bash" shows the name of the computer (the hostname) and the current directory.

It looks like your hostname has been changed to the string "http://thissite:".

To check, run the command "hostname" in a terminal without the quotes. This command will print the current name of the computer. On OS X, most users set the hostname in System Preferences->Sharing-> "Computer Name:".

----------



Looks like a DNS poison attach that is trying to trick you into attempting to login to the URL with your username. If you try that the attacker will be able to capture your username, password, and the IP of your machine.

Powering off your router and your laptop at the same time then powering them back on is likely to resolve the problem.
I powered off the router and computer at the same time and the site name is still listed in terminal before my username.
I should mention as well that I noticed this when I tried to send an email using mail for a gmail account. The email was not sent and I was given a mailer-daemon error. The same site appeared in the body of the email. I have changed my password for email recently, as well as my login password. Any other suggestions would be nice. Thanks so far to everyone who has helped.