Terminal gets confused

Coccinaile

Registered
Hello, I only have an administrator account and the Terminal seems to be working under the identity of the older account that doesn't exist anymore. Plus it displays my root password. It looks like it : rootpassword:~ olduseraccount$. It probably needs some cleaning, but what can I do ?
Thanks
 
First open System Preferences->Sharing and make the Mac name is the correct name you want. Second if Terminal is still doing t's weird thing then you can reset Terminal by open /Users/YourUserName/Library/Preferences/ and find the preferences file com.apple.Terminal.plist and move it to the Trash Can. This will reset the Terminal application to it's being again. See if that changes anything. If it doesn't you can move that preference file back to it's original location.
 
Is your shell 'bash'? You can check with the 'ps' command.

$ ps
PID TTY TIME CMD
18265 ttys000 0:00.01 -bash
...


Assuming it is, look at your files ~/.bashrc and /etc/bashrc for any definition of the word PS1. The default is

PS1='\h:\W \u\$ '

which would give a display like you report. The replacements are

\h is the name of your machine
\W is the current directory (with ~ for your home)
\u is your username
\$ is $


Look at the 'man' page for 'bash' under the heading PROMPTING for a bunch of other replacements you can use.
 
Hello Satcomer and Whitehill,

I have changed the computer's name in Share pref : no changes.
I have put the terminal.plist in the trash can : nothing.
Maybe I should restart the computer ?


To Whitehill
Yes : My shell is «bash»
I'm sorry I'm not very familiar with the process.
When I try bash, I get this : bash-3.2$
When I try bash-3.2$ : PS1='\h:\W \u\$ ' the terminal displays comes back to the previous display of the two names.
So I will try to understand these commands.

Thanks you both for your help. I understand I need a little bit more knowledge to apply your suggestions. I will do my homeworks.
 
Hello, since yesterday, my local address 127.0.0.1 keeps trying to connect at my local address. Please, tell me what to do to correct this situation. Thanks
 
I'm not sure what you're asking. The IP address 127.0.0.1 is used by each and every computer to refer to itself. What is trying to connect to what?
 
Hello, when I look at the connections via WaterRoof, I got these connections (hundred of them):
Local address : 127.0.0.1: port number
Foreign address : 127.0.0.1:port number
State : closed/wait

I must tell you though that today everything seems to be back to normal. I just put the account setting the way it was before.

Thanks a lot.
 
Back
Top