API - Is there a way to reset LXC password

yswery

Well-Known Member
May 6, 2018
84
5
48
55
Hi Team

I was wondering if there is a way to reset the password to a container in proxmox 5.X using the PVE API?

I can you can (using terminal) pct enter XXX and then change password that way, however I am looking to be able to do in a more programmatic way and over a multi-node cluster (to avoid SSH into the right now just to set a password sort of deal)
 
you can set the password when you create the container, but we do not allow that for existing containers.
 
Yep we are already doing this, however we are hoping to be able to give the client the ability to CHANGE/RESET their passwords without the need of reinstalling nor our manual intervention (pct into the container to change the pass)

Am I right in saying the only way to automate this process would be to set a script to SSH into the hostnode and then execute PCT command? or is there something more cleaner we can do especially considering the hostnodes are set in a cluster?