When Apigee Edge Private Cloud is installed, a special sysadmin user is created. This user’s email address (user ID) is stored in a few key places in the system configuration and it is used for administrative actions such as creating additional users and executing system-level scripts. If you want to change the email address of the system user, the following steps are required:
-
Update the sysadmin email address in the LDAP user directory.
-
Update the sysadmin email address in the Apigee environment settings file.
-
Update the sysadmin email address in the Apigee Enterprise UI configuration file.
First, update the existing sysadmin user with a new email address using the following curl command on the management server:
> curl -iu <current_sysadmin_email> 'http://localhost:8080/v1/users/<current_sysadmin_email>' -X PUT -d '{"emailId": "<new_sysadmin_email>", "lastName": "admin", "firstName": "admin"}' -H content-type:application/json
If you want to use an entirely separate user instead of changing the existing sysadmin user, simply ensure that the new user is assigned to the global sysadmin role:
> curl -iu <current_sysadmin_email> 'http://n1:8080/v1/userroles/sysadmin/users' -X POST -d 'id=<new_sysadmin_email>'
Next, update the stored sysadmin email in the environment settings file on every Apigee host. In apigee4/bin/apigee-env.sh, change the ADMIN_EMAIL variable to your desired value. Ensure that the update is made across the entire cluster.
Finally, run the apigee4/bin/chpasswd-system.sh script on every Enterprise UI host to store the new user ID in your Enterprise UI configuration. This script will pull the new sysadmin email address from apigee-env.sh, update the UI configuration and restart the UI service.
For additional details, reference the section “Adding a system administrator” in the Private Cloud Operations Guide.