User password expiration

Hi there,

I got a question for cloud.conf in gadget snap. I added the below codes for user password expiration:

  expire: True

But it doesn’t work. I am not sure if snapd uses this code: On line 224,, 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.


This sounds like a cloud-init question, if you show your entire cloud-init config and how you are using it with UC20 I can take a look, but it’s quite possible that I will still not know why it doesn’t work.

I used the below lines after datasource_list: [NoCloud] in cloud.conf:

  expire: True

It seems NoCloud may not run the correct passwd command to invalidate passwords. Where could I find the source codes for NoCloud?


No idea where specifically, but is the upstream source for cloud-init, so somewhere in there

1 Like