Giving local machines names rather than IP addresses: A follow-up
Giving local machines names rather than IP addresses: A follow-up
Regarding yesterday's item on assigning local names to local addresses:
Joseph Bruni adds:
- You don't have to restart the netinfo domains for changes to take effect. All changes are dynamic.
- If the machines you create in the machines section are not running OS X, you should remove the 'serves' property. The only two properties you need are name and ip_address.
Cory Tobin describes another method entirely, which "sets the hostname on the Unix end and in NetInfo":
- Open Terminal.app.
- Type: sudo hostname -s <machinename>.
- Edit the file </etc/hostconfig>. You can do this via Terminal, using the pico editior (i.e., type: sudo pico /etc/hostconfig) or by opening up an Aqua text editor, such as TextEdit, with root privileges (e.g., type: sudo open <path for TextEdit.app>
- Where the text "HOSTNAME=-AUTOMATIC-" appears, replace "-AUTOMATIC-"
with whatever name you want (no spaces, of course). - Save changes and quit.
- Open up NetInfo Manager.app. Click the lock icon to unlock the app so you can edit settings.
- The second window pane will have the things that can be set for /. Click on "machines" and in the third pane click on "localhost."
- In the bottom pane, click on the hierarchial arrow to show all items for localhost.
- Click on the localhost listed within that. From the Directory menu, select New Value.
- Type in the machinename you want and hit return, then drag it so it's above localhost.
- Select "Save" from the Domain menu, confirm the update and quit.
- On the next restart the machinename will be whatever you set.
Computing Guides
Laptops
Desktops & Monitors
Computer Accessories
Photography
Tablets & E-Readers
3D Printers