PMM 2 user creation from CLI not from UI


We have deployed pmm 2.39 on one of our on-premise VMs. As part of reconfiguration, in case of hardware failure or any instance-related issues, we have prepared a script to configure PMM on the VM and perform all necessary setups. However, to create users with different access levels (admin, edit, and view) in PMM, we currently have to manually create them through the PMM UI (default username and password are admin/admin).

Is there a way to automate the user creation process using a script OR the command-line interface (CLI), instead of manually creating users through the PMM UI after logging in with the default admin user?


PMM - 2 (2.39.0)
Attaching the user section that we want to create.

Hi @pravata_dash

You may use an API request for creating a user.

1 Like


Sure, thanks will go through this and let you know in case of any concerns.
So, there is no command at the docker level to create a user like changing the admin password ??

Ex: To change the pmm 2 admin password, we execute the below command directly in the PMM server.

docker exec -t pmm-server bash -c ‘grafana-cli --homepath /usr/share/grafana --configOverrides admin reset-admin-password newpass’

I don’t see any parameters for grafana-cli utility to work with users.

Sure, thanks for the update, we will check the API part you have shared.