Hi there,
I got a question for cloud.conf in gadget snap. I added the below codes for user password expiration:
chpasswd:
expire: True
But it doesn’t work. I am not sure if snapd uses this code: https://github.com/number5/cloud-init/blob/master/cloudinit/config/cc_set_passwords.py#L220-L230. On line 224, https://github.com/number5/cloud-init/blob/master/cloudinit/config/cc_set_passwords.py#L224, it refers to cloud.distro.expire_passwd(u)
. Since the uc20 cloud.conf uses NoCloud
, does NoCloud
have the correct implementation for expire_passwd
?
As a workaround, I am using the command passwd --expire username
.
Thanks,
Hao