[see the comments for a solution]
|
|
|
My friend is running DHCP at his house. I noticed that it also assigns an Host name to OS X. How do I override this host name? While DHCP is enabled, the Host name field is grayed out.
[see the comments for a solution]
•
[30,646 views]
Hint Options
Host name
If you use DHCP for your IP address it will lock out the Host name. To enter a name you like
Host name
Erm, not on my machines!
Host name
Or you could just bring out Terminal.app su root and then type
Override Host name assigned by DHCP?
Please help me oh friendly and all-knowing Unix/Mac OS X gods! My hostname keeps getting over-written every time I join the network at work.
Here's the situation. I am joining my network at work, via DHCP, by either wifi or ethernet. Every time I join the network, DHCP forces a hostname on me. How do I know this? I fire up Terminal and it reads out not one but 2 other hostnames of computers on our network at the Terminal prompt: [mnx_oandersonmnx_jsmith:~] bschwie% At first, I didn't care about it, but after I tried printing, I soon realized that I was unable to print, the error in Print Center mentioning something about a "control file". To work around this situation, each time I hop on the network at work, I open up Terminal and perform the following: [mnx_oandersonmnx_jsmith:~] bschwie% su mnm_bschwietibook:/Users/bschwie root# hostname mnm_bschwie after exiting from root mode, quitting Terminal, and then re-opening Terminal, I see that my changes have taken hold and my prompt now looks like it should have in the first place: [mnm_bschwie:~] bschwie% The problem with this workaround is, whenever I leave for the day, and come back to work the next, the hostname has re-set itself again. Man, this is not good... Please help! Is this something I should be changing in NetInfo. Also, I made the hostname "mnm_bschwie" the hostname in the Sharing Control Panel. Still, this doesn't seem to help my problem of acquiring former hostnames on the network at work. If it matters at all, I'm getting a DHCP lease from a Windows 2000 Server.
Override Host name assigned by DHCP?
This is advice from Trevor in the Forums and the only thing that ended up getting things to work for me:
Override Host name assigned by DHCP?
I ran into this problem myself today (unsure if it was a change for 10.4.7 or a changed in the wireless router here on campus that caused it). In either case, this fixed it.
sudo emacs /etc/hostconfig
if you see the line: HOSTNAME=-AUTOMATIC- replace -AUTOMATIC- with the hostname of your choice. Otherwise, add the line: HOSTNAME="My Host Name" to the end of the file, save and exit. I restarted, and my hostname was no longer reset by DHCP!
Of course, I use emacs, 'cause that's just how I roll. Feel free to use vi, pico, or whatever else you want. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.13 seconds |
|