2

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:

users:
   - default 

My:

 users:
   - 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

/etc/shadow:

myuser:!$6$1234567890ABCDEF$3ytr6BmrrL5SVyQFBeHLveNX5ublgYVM8Cae3AS2g1gNsZgzenAKUzfvYRUGOIUk4YX5c6qngE5cx.JaiFe/k1:18717:0:99999:7:::

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

How can i fix this trouble?

2

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, privacy policy and cookie policy

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