Installing remotely on a Mac computer using sudo commands

Perform the following steps to use sudo commands to install the agent remotely on a target Mac computer without requiring any user interaction on the target Mac computer.

To install the agent remotely using sudo commands:

  1. Ensure that you have administrator account credentials on the target Mac computer, and that SSH is installed on the target Mac computer.
  2. On the computer where the Centrify packages were downloaded (that is, the source computer), use an appropriate file transfer method to push the CentrifyDC-x.x.x.pkg file to the target Mac computer.

    For example, perform these steps to transfer files from a PC source computer to the target Mac computer:

    1. On the source computer, ensure that file sharing is enabled, and that the folder containing the Centrify packages is a shared folder.

    2. On the target Mac computer:

      • Open a new window in the Finder.

      • In the sidebar under Shared, click All.

      • Select the source computer.

      • Click Connect As, type the user name and password for the source computer, and click Connect.

    3. The folder that you shared on the source computer appears in the Finder on the target Mac computer. Locate the CentrifyDC-x.x.x.pkg file on the source computer and drag it to the location of your choice on the target Mac computer.

  3. On the source computer, use a program such as Putty to connect remotely to the target Mac computer through SSH. Log in to the target Mac computer using an account that has local administration privileges, such as the Local Admin account.

  4. On the target Mac computer, navigate to the directory where the .pkg file was transferred and execute the following command:

    sudo /usr/sbin/installer –pkg CentrifyDC-x.x.x.pkg –target /

    When you execute this command, the agent is installed silently on the target Mac computer.

    • If an agent was already installed on the target Mac computer and this was an update of the existing agent, the target Mac computer was already joined to the domain, and you do not need to perform any additional steps.

    • If this was the first installation of the agent on the target Mac computer, you must enable licensed features and join the target Mac computer to a domain as described in Step 5 and Step 6.

  5. Execute the following command on the target Mac computer to enable licensed features:

    sudo adlicense -l
  6. When you join the target Mac computer to a domain, you can choose to join the auto zone or a specified hierarchical zone.

    • Execute the following command on the target Mac computer to join the target Mac computer to a domain and the Auto Zone:

      sudo /usr/local/sbin/adjoin --user Domain_Admin --container "domain.com/Path/To/OU" 
      --name computer_name --workstation domain_name.com
    • Alternatively, execute the following command on the target Mac computer to join the target Mac computer to a domain and a specified hierarchical zone:

      sudo /usr/local/sbin/adjoin --user Domain_Admin --container "domain.com/Path/To/OU" 
      --name computer_name --zone zone_namedomain_name.com