6 Replies Latest reply: Feb 9, 2013 4:50 AM by BB623
BB623 Level 4 Level 4 (1,160 points)

A friend of mine went into Terminal and added lines to host.  Now I cannot use itunes to update software.  I have the lastest version of Mountain Lion

How can I see the changes and/or restore back to how it was.

Thanks.


MacBook Pro, OS X Mountain Lion
  • 1. Re: Host file on Mac??
    Kappy Level 10 Level 10 (226,765 points)

    Normally, the host file is in the /etc/ folder.

  • 2. Re: Host file on Mac??
    BB623 Level 4 Level 4 (1,160 points)

    I will look. He typed something like this to edit

    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts

    I didn't see any weird saved settings here.  I think he blocked some ports, don't know why.

    I have adminstrative rights so will prompt for password.  Sorry I'm a geek in training and want to make sure I don't mess things up. 

    It's just my iPhone and iPad apps wont update.  I updated it on my PC fine to 6.1 but was getting an error that cannot connect to the server.  It use to work before my "friend" messed with my Mac.

  • 3. Re: Host file on Mac??
    Kappy Level 10 Level 10 (226,765 points)

    The use of the host file has been deprecated in Mountain Lion and should not be used. You can safely delete it or simply remove the added lines and resave it with just the comment lines of the original file. Reboot when you finish.

  • 4. Re: Host file on Mac??
    BB623 Level 4 Level 4 (1,160 points)

    I talked to Apple and said it could be a router issue or firewall issue.  I don't use a firewall unless enabled automatically.  I will check/remove the above and see if this works first.

  • 5. Re: Host file on Mac??
    William Lloyd Level 6 Level 6 (19,350 points)

    Why doesn't your friend help you remove the lines he added?  He sounds like a jerk.  Maybe go slash his car tires

  • 6. Re: Host file on Mac??
    BB623 Level 4 Level 4 (1,160 points)

    Small error corrected in the host file, now updates work.  There was a missing # before the ip address on the gs.apple.com line.  I actually talked with Apple and said this is a random issue that occurs to people on iTunes updates.  Also could have occurred when the security hole patches were released a few months back.  The script to fix the hole reviews/edits the host file.   I did talk to friend and didn't touch the host file, just a coincidence things started to not work.