How to Set or Change Root Password on Deployed Machine

Hi everyone,

I’m working with MAAS to deploy bare-metal machines and I need to set or change the root (or default) user password on the deployed systems.

  • Should this be done using a cloud-init script? If yes, could you please provide an example of how to do it?
  • Alternatively, is there an API method available for setting the root password during or after deployment?

I’d appreciate any guidance or best practices you can share.