Comment 0 for bug 1570325

Revision history for this message
Tore (tlonoy) wrote : RFE: chpasswd in cloud-init should

The only way to assign a hashed password to a user is to use passwd within a users entry like this:
users:
   - name: root
     passwd: $6$Cl....Hy$IEJciQZLxQLzkST......g.bzqf3lUl.

But, if that user is already present on the system, cloud-init will skip setting the password:
journal: [CLOUDINIT] __init__.py[INFO]: User root already exists, skipping.

You can change password with chpasswd, but that only supports clear-text password.

Requesting that chpasswd get support for setting a hashed password to users.