Wrong computer name in terminal app

Can someone shed some light on this for me...

I was connected to a client's windows network today. During the day I used my terminal app, and got this at the prompt...

Last login: Thu Feb 28 13:24:22 on ttys000
adrian-laptop:~ nigel$

The odd thing is that my MBP is called Nigels-MacBookPro, so what on earth is adrian-laptop?

At home just a little while ago I started terminal again, and correctly saw this at the prompt...

Last login: Thu Feb 28 21:19:07 on console
Nigels-MacBookPro:~ nigel$

There used to be someone who worked there called Adrian... my guess is that his old laptop was on today, and is called adrian-laptop (I've just emailed the company to check this out)

...but why would my terminal app show another computer name, and why did the first prompt say 'on ttys000' and the later one say 'on console'?

Thanks

Nige

MacBook Pro, Mac OS X (10.5.2), 2.4GHz / 4GB / ex-ELP keyboard (hurray!)

Posted on Feb 28, 2008 1:43 PM

Reply
9 replies

Feb 28, 2008 1:52 PM in response to nigelj

You should not worry too much: The "adrian-laptop" name you got has been retrieved by your Mac from the name server authoritative on the network you were hooked up that day.

You got an IP address through a DHCP server, probably. That address must be created in the "reverse" table of the name-server, as "adrian-laptop".

Your Mac tries to resolve its name based on the information it gathers. Network first, and by default from the setting you've done in the Sharing Preferences.

My MBP, while at work today, got a dynamically allocated IP looked up as "211pc45". If I open a new xterm (or terminal), It'll get the name I've manually assigned as default, because I've not bothered creating a reverse table on my small home network.

I hope this helps

Mar 2, 2008 7:37 AM in response to nigelj

Re those curious and unwelcome names...

As Thierry said, it is due to "reverse DNS" and there isn't, AFAIK, anything you can do to stop it – but you can correct it. If you have the right sort of setup, you can assign 10.0.0.2 to your modem and have DNS dealt with by your router (AirPort Extreme in my case). I do just that so that I now have, correctly, BossMac:~ andreas$ instead of gobbledegook. With my modem/router the other way round I frequently got bits of other people's names and passwords as my Terminal prompt, and no Sir, I didn't like being Mary471 one day and 813Phyllis.fishnet the next! It's totally harmless, but I would agree that it's most unwelcome. Have a look at this MacOSXHints thread in which the erudite Hal Itosis offers some niceties.

Mar 2, 2008 9:44 AM in response to nigelj

Thank you both for your replies.

I really want to know how Terminal works (how to work it). Can anyone suggest a complete - *for idiots*- tutorial on how to use it? I am not an idiot, just uneducated in this realm.

Basically, I know what you are saying about the unwanted names, but after that, I have no clue what you are talking about, and I am sure you have probably simplified it for me to begin with.

I appreciate your time!! 🙂

Respectfully,
Beanaree

Mar 2, 2008 11:07 AM in response to Beanaree

Beanaree
I really want to know how Terminal works (how to work it)

I feel sure that you are really asking for an easy lesson not in how to use Terminal, but in Unix. Easy, simple and quick instructions for learning a language don't exist, but if you go to any of the Unix forums you will have a choice of tutorials and you can choose one that is written in a way you feel you can follow.

I have no clue what you are talking about

I guess that you are referring to modifying your hardware configuration and connection addresses. If you have "no clue" you are best advised to leave well alone or you would be in serious risk of losing your internet connection. There is no one set of instructions we could give you - the procedure is dependent on your hardware combination and your current configurations.

Sorry. I'm not trying to be negative - just realistic.

Mar 2, 2008 11:28 AM in response to nigelj

Let me preface this by saying I seriously appreciate your time and patience with me.

However, you misunderstand my intentions, as I have not explained them.

But to justify:

If many of you have learned it, I will acquire the knowledge as well. I am hardly looking for a "quick fix", but thank you for throwing me in that pool.

The reason I am asking for tutorials is because when I do a google search, I get plenty of opinions out there which is not what I am looking for. I completely understand what the ramifications of my actions could be, hence the need and desire for tutorials.

I see books on Phrases for Unix and other Unix titles, but they do not make mention of OSX. I don't want to make guesses on the literature I am buying.

Could anyone tell me what book they learned from? (if you learned on your own, that's awesome, but that's not what I am looking for.)

I will post this elsewhere as now I am making a specific request that the title does not reflect.

Thanks for your time.

Message was edited by: Beanaree

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Wrong computer name in terminal app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.