Apigee Edge for Private Cloud creates a system administrator (sysadmin)
user during initial installation and stores that user's encrypted credentials
in configuration files on the New Edge UI (`edge-management-ui`)
node. The New Edge UI uses these stored credentials to authenticate backend
requests to the Management Server. If the password or email address for your
sysadmin user changes (for example, in your external LDAP or after a password
reset), you must update the stored sysadmin credentials on the New Edge UI
node.

## Change the New Edge UI sysadmin credentials

You can update the stored sysadmin credentials on the New Edge UI
(`edge-management-ui`) using either of the following methods:

- Run the `apigee-setup` utility with the `ue` profile and a silent configuration file.
- Encrypt the credentials with the `management-ui` binary and set `conf_uebe_mgmtCredential` in `/opt/apigee/customer/application/management-ui.properties`.

### Update credentials
using apigee-setup

1. Edit the silent configuration file that you used to install the New Edge UI (`edge-management-ui`) to set the sysadmin and SMTP properties:

   ```
   ADMIN_EMAIL=newUser
   APIGEE_ADMINPW=newPW
   SMTPHOST=smtp.gmail.com
   SMTPPORT=465
   SMTPUSER=foo@gmail.com
   SMTPPASSWORD=bar
   SMTPSSL=y
   SMTPMAILFROM="My Company <myco@company.com>"
   ```

   You must include the SMTP properties when updating the sysadmin
   credentials because `setup.sh` resets all New Edge UI
   properties from the silent configuration file.
2. On the New Edge UI node, run the `apigee-setup` utility with the `ue` profile to update the credentials on `edge-management-ui`:

   ```
   /opt/apigee/apigee-setup/bin/setup.sh -p ue -f configFile
   ```

### Update credentials using
management-ui.properties

1. On the New Edge UI node, change to the `/opt/apigee/edge-management-ui` directory and encrypt the sysadmin username and password using the `management-ui` binary:

   ```
   cd /opt/apigee/edge-management-ui && ./bin/management-ui --encrypt 'userName:PWord'
   ```
2. Open `/opt/apigee/customer/application/management-ui.properties` in an editor. If the file does not exist, create it:

   ```
   vi /opt/apigee/customer/application/management-ui.properties
   ```
3. In `management-ui.properties`, set the `conf_uebe_mgmtCredential` token to the encrypted value returned in Step 1:

   ```
   conf_uebe_mgmtCredential="STRING_RETURNED_IN_STEP_1"
   ```
4. Set the owner of `management-ui.properties` to `apigee:apigee`:

   ```
   chown apigee:apigee /opt/apigee/customer/application/management-ui.properties
   ```
5. Configure and restart the New Edge UI (`edge-management-ui`):

   ```
   /opt/apigee/apigee-service/bin/apigee-service edge-management-ui configure
   /opt/apigee/apigee-service/bin/apigee-service edge-management-ui restart
   ```

### Test the New Edge UI configuration

1. Open the New Edge UI in a browser on port 3001:

   ```
   http://edge_UI_IP:3001/
   ```

   For example:

   ```
   http://192.168.52.100:3001/
   ```
2. Log in using the updated sysadmin credentials. A successful login confirms that the New Edge UI configuration is valid.

### Test the Management Server configuration

Verify that you can access the central pod on the Management Server by
running the following `curl` command:

```
curl -u sysAdminUser:password \
  http://localhost:8080/v1/servers?pod=central
```

The Management Server returns output in the following format:

```
[ {
  "internalIP" : "192.168.1.11",
  "isUp" : true,
  "pod" : "central",
  "reachable" : true,
  "region" : "dc-1",
  "tags" : {
    "property" : [ ]
  },
  "type" : [
    "application-datastore",
    "scheduler-datastore",
    "management-server",
    "auth-datastore",
    "apimodel-datastore",
    "user-settings-datastore",
    "audit-datastore"
  ],
  "uUID" : "d4bc87c6-2baf-4575-98aa-88c37b260469"
}, {
  "externalHostName" : "localhost",
  "externalIP" : "192.168.1.11",
  "internalHostName" : "localhost",
  "internalIP" : "192.168.1.11",
  "isUp" : true,
  "pod" : "central",
  "reachable" : true,
  "region" : "dc-1",
  "tags" : {
    "property" : [ {
      "name" : "started.at",
      "value" : "1454691312854"
    }, ... ]
  },
  "type" : [ "qpid-server" ],
  "uUID" : "9681202c-8c6e-4da1-b59b-23e3ef092f34"
} ]
```