Skip to main content
Question

Hosting Script


Forum|alt.badge.img+5

Does anyone have a bash script that will allow adding a networking host during imaging? Essentially we want to make sure all of our machines point to our server IP address. If you need an example type:

sudo vi /private/etc/hosts

to see your hosting file.

8 replies

Forum|alt.badge.img+16
  • Honored Contributor
  • 1054 replies
  • October 7, 2015

Not even remotely sure, but I have read somewhere that "/etc/hosts" is deprecated...

C


Forum|alt.badge.img+5
  • Author
  • New Contributor
  • 5 replies
  • October 7, 2015

@gachowski any good ideas on ways to change a server IP and ensure all of the machines can still see it?


davidacland
Forum|alt.badge.img+18
  • Valued Contributor
  • 1811 replies
  • October 7, 2015

Can you not do this with a DNS server?


mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • October 7, 2015

^ Same thought as @davidacland If the server has had its IP changed, making sure clients can still connect is typically done with DNS these days. Get the server using an FQDN instead of an IP and there shouldn't be any issues. Trying to do this with a local hosts file is kludgy at best.


Forum|alt.badge.img+16
  • Honored Contributor
  • 1054 replies
  • October 7, 2015

Myles, I don't sorry and I really don't understand what you are trying to do... I would also not trust my "/etc/hosts is deprecated" it still might do what you want it too....

http://apple.stackexchange.com/questions/158117/os-x-10-10-1-etc-hosts-private-etc-hosts-file-is-being-ignored-and-not-resol

C


Forum|alt.badge.img+10
  • New Contributor
  • 596 replies
  • October 8, 2015

DNS does this, its a cool new service thats been around for a couple of years now


Forum|alt.badge.img+5
  • Author
  • New Contributor
  • 5 replies
  • October 9, 2015

@mm2270 & @gachowski I wish it was in my hands to actually use DNS but the Network setup is not in my hands totally. So this is what I have to do until I can get the Network Engineer to use a different practice. If I'm missing something about DNS and the JSS then I will surely take the advice.

The only thing I'm looking for is a script to run on all of my machines to add a hosting file on my Macs.


Forum|alt.badge.img+24
  • Valued Contributor
  • 1892 replies
  • October 9, 2015

This isn't going to help you, but I'd strongly recommend getting DNS in place and to a point where it's robust and healthy. Apple products heavily rely upon good DNS and it's not there, you're going to run into issues.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings