Help me to revert to the original Hosts File

Discussion in 'macOS' started by weatherreport, May 27, 2012.

  1. weatherreport macrumors newbie

    May 3, 2012
    I have always been on the safe side when it comes to buying authenticated apps and software. Never jailbreaked my iPhone/iPad; and never ever used cracked mac software. But I landed my macbook pro (running lion) to my brother which he used in a roadshow for about a month on the run. When i got it back it had an Adobe CS 5 photoshop in it. My brother said he essentially needed and cracked it... Anyway, i will be pleased if we can skip the moral side and try to have a helping hand.
    He said he installed it through terminal editing the hosts file by a walkthrough. I immediately uninstalled the software, but how can i turn my hosts file back to the original. Please help me out.

    He said he used this walkthrough to proceed:

    1.Extract the files.
    2.Run Setup, Install as trial.
    3.Make shure photoshop is closed.
    4.Open the 'Terminal' application and paste the following:
    sudo /Applications/ /etc/hosts

    5. Paste the the following text between localhost and

    #Activation Blocker practivate.adobe tpractivate.adobe.newoa practivate.adobe.ntp practivate.adobe.ipp

    6.Save the document (Command+S)
    7.Go to terminal and run the following from below to flush:
    sudo dscacheutil -flushcache

    8.Run Photoshop and click on the help menu and select "Deactivate"
    9.Select "Deactivate Permanently" and make shure photoshop is closed.
    10.Run Photoshop and enter the serial from below.
  2. crimsontide165, May 27, 2012
    Last edited: May 27, 2012

    crimsontide165 macrumors member


    Feb 5, 2011
    I'm not sure you can restore the original but you can open it up in terminal:

    sudo vi /etc/hosts

    then press the '"i" key to insert then use the arrows keys to go to the bottom and backspace all of the stuff that was added. After that press the "esc" key and then type ":w". This should fix all of the stuff that was added.

    or edit it in TextEdit:

    sudo /Applications/ /etc/hosts

    and delete all of the lines that were added, then save.
  3. weatherreport thread starter macrumors newbie

    May 3, 2012
    Thanks for the reply, crimsontide165
    Well I'm not really familiar with terminal.
    Actually I don't even know what a hosts file is anyway.
    But I tried several things, deleting adobe related entries manually.
    Now when I paste the following in the terminal:

    sudo /Applications/ /etc/hosts

    A textedit file named as "Hosts" opens up. Like this:

    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting. Do not change this entry.
    ## localhost broadcasthost
    ::1 localhost

    Am I good to go now?
    Do you think that's ok?
  4. SuperJudge macrumors 6502


    Apr 2, 2008
    The Triangle, NC
    It looks clean. You should be good to go now.

    FYI, the hosts file designates a specific IP address to go with a specific hostname that will override any address you get from DNS. What those additions did was stop the computer from talking to Adobe's servers by redirecting the traffic to the loopback adapter, effectively black-holing it.
  5. weatherreport thread starter macrumors newbie

    May 3, 2012
    Thank you for the info SuperJudge.
    BTW, besides being a part of software piracy, were there any security risks involved if I kept the hosts file that way. Or any risks in the health of os?
  6. crimsontide165 macrumors member


    Feb 5, 2011
    Not really, just the piracy part. If you tried to access any of those that were on the list they would be redirected to localhost.
  7. whit42889 macrumors newbie


    Jul 22, 2016
    Okay so i've been trying this for a while now and I keep getting the same result. When I open terminal and paste the following into terminal sudo /Applications/ /etc/hosts, it starts to ask for my password.
    As I try and type my password it doesn't seem to recognize that i'm typing it in there and I hit enter and it just reverts to the main thing it said when terminal originally opened:
    Whitneys-MacBook-Pro:~ Whitney$

    So I never get a text edit box to open at all
    I'm sure its something I'm doing, I just can't figure out what!
  8. ScoobyMcDoo macrumors 65816

    Nov 26, 2007
    Austin, TX
  9. simon lefisch macrumors 6502a

    simon lefisch

    Sep 29, 2014
    You can always edit the host file from Terminal:
    sudo nano etc/hosts
  10. JohnDS macrumors 65816

    Oct 25, 2015
    The easy way to deal with a hosts file is to download and install the freeware TextWrangler:

    Have the Applications folder open on your desktop so that you can see the TextWrangler icon.

    Open a second finder window. Pull down the GO menu to Go to Folder. In the Go to Folder box type the following and hit return:


    This should open the /etc Finder window. Scroll until you find the Hosts file. Drag and drop it onto the icon for Textwrangler.

    This should open the hosts file in Textwrangler and allow you to edit it in the TextWrangler GUI.

Share This Page