Setup default password for user `ubuntu`

Hello there,

I want to use Curtin (not cloud-init) to preseed the default password of user ubuntu for all future deployment, but eventually got deployment failed:

Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmp2krg_2o_/target', 'sh', '-c', "echo '1000:mynewpass' | chpasswd"] with allowed return codes [0] (capture=False)
chpasswd: (user 1000) pam_chauthtok() failed, error:
Authentication token manipulation error
chpasswd: (line 1, user 1000) password not changed

Is there any workarounds? Thanks