MacOS – How to enable/disable Adobe host port in terminal

adobe-photoshopmacosmacportsterminal

I disabled some ports (below) to be able to install Adobe Photoshop/Illustrator applications. The challenge is to re-enable them through terminal, otherwise I could not install Photoshop( see below picture ).

It can be run with simple sudo sh >filename<

This file contains this bash command:

echo "Do you wish to update your host file ?"
select yn in "Yes" "No"; do
    case $yn in
        Yes ) echo "127.0.0.1     activate.adobe.com" >> /etc/hosts;
              echo "127.0.0.1     practivate.adobe.com" >> /etc/hosts;
              echo "127.0.0.1     lm.licenses.adobe.com" >> /etc/hosts;
              echo "127.0.0.1     lmlicenses.wip4.adobe.com" >> /etc/hosts;
              echo "127.0.0.1     hlrcv.stage.adobe.com" >> /etc/hosts;
              echo "127.0.0.1     na1r.services.adobe.com" >> /etc/hosts;
               break;;
        No ) break;;
    esac
done

It needs to reenable because it can not allow installation from this point:
ADOBE SETUP

Does anyone know what commands are capable to reenable them? Or are there any programs to do it automatically?( It should be there because later I found an automatic program which – then – solved this challenge but now I could not enable it.

Best Answer

Not by commands/ scripting, but to solve the issue:

Open the file /etc/hosts by pasting it in "Go to Folder" in Finder. Edit out anything related to Adobe. This would stop redirecting those urls to 127.0.0.1 which is localhost. Thus allowing connections to actual IP. In my file, localhost, broadcasthost are there only.

Also, for unknown errors/causes, https://helpx.adobe.com/creative-cloud/kb/cc-cleaner-tool-installation-problems.html is helpful.