DCImanager 6 Knowledge Base
Do you make friends with the documentation?
Share your opinion and complete a small poll
Take a survey

If the location is not accessible through the root user

If security policies prohibit connecting to the location through the root user, you can set up a connection through another account. This account must have superuser permissions.

To configure a connection to the location:

  1. On the location server:
    1. Open the file /etc/sudoers:

      visudo /etc/sudoers
    2. Configure superuser permissions for the accounts. To do this, add or edit the %sudo parameter:

      %sudo   ALL=(ALL:ALL) NOPASSWD: ALL
  2. Add or edit location settings in the platform via API:
    1. Get the authorization token.
      curl -k -X POST -H "accept: application/json" -H "Content-Type: application/json" 'https://domain.com/auth/v4/public/token' -d '{"email": "admin_email", "password": "admin_pass"}'
      Comments to the command

      In response, you will get the message in the form:

      Example of response in JSON
      {
        "confirmed": true,
        "expires_at": null,
        "id": "6",
        "token": "4-e9726dd9-61d9-2940-add3-914851d2cb8a"
      }

      Save the received token value.

    2. Run an API request to add or edit location settings. You can use the curl utility or the Swagger interactive shell. In the ssh_user parameter, specify the username for connection:

      Example of a request to add a location
      curl -k -X 'POST' \
        'https://domain.com/dci/v3/location' \
        -H "x-xsrf-token: <auth_token>" \
        -H "isp-box-instance: true" \
        -d '{
        "name": "My Location",
        "password": "secret",
        "ssh_address": "192.0.2.1",
        "ssh_port": 22,
        "ssh_user": "username"
      }'
      Comments