I try create preinstalled user for Ubuntu 20.04. For this i add some entries in accordance with official docs, to /etc/cloud/cloud.cfg (config for cloud-init ) Old:

   - default 


   - default
   - name: myuser
     groups: myuser
     home: /home/myuser
     shell: /bin/bash
     hashed_passwd: $6$1234567890ABCDEF$3ytr6BmrrL5SVyQFBeHLveNX5ublgYVM8Cae3AS2g1gNsZgzenAKUzfvYRUGOIUk4YX5c6qngE5cx.JaiFe/k1

And next run on raspberry pi 4. After finish initialization (without errrors ) i try login on user and this step failed. After i see on /etc/shadow for check password creation, and find this line



And seed reduntant '!' on password's begin. Without this '!' all worked good.

How can i fix this trouble?

1 Answer 1


Yes this one got me as well its because of the following parameter and its default settings;-

lock_passwd: Optional. Disable password login. Default: true

So the fix is to set lock_passwd: false in your 'users' section as the default is to lock the password by prefixing a '!'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.