Skip to content

Fix expire passwords for hashed passwords#1577

Merged
TheRealFalcon merged 6 commits into
canonical:mainfrom
SadeghHayeri:fix-expire-hashed-passwords
Jul 12, 2022
Merged

Fix expire passwords for hashed passwords#1577
TheRealFalcon merged 6 commits into
canonical:mainfrom
SadeghHayeri:fix-expire-hashed-passwords

Conversation

@SadeghHayeri
Copy link
Copy Markdown
Contributor

Proposed Commit Message

summary: fix expiration for hashed passwords

there was a bug in `cc_set_password` that only expires passwords when using a raw password for chpasswd.list. this fixes the issue and runs expiration for both users and also hashed_users
[refrence](https://cloudinit.readthedocs.io/en/latest/topics/modules.html?highlight=chpasswd#set-passwords)

@SadeghHayeri SadeghHayeri changed the title fix: Fix expire passwords for hashed passwords Fix expire passwords for hashed passwords Jul 11, 2022
@holmanb
Copy link
Copy Markdown
Member

holmanb commented Jul 11, 2022

Thanks for putting together a contribution with a fix and tests!

Can I have you please include your github username to tools/.github-cla-signers and sign the cla as well? Once that's squared away we can get this reviewed.

@SadeghHayeri
Copy link
Copy Markdown
Contributor Author

@holmanb Done!

@holmanb
Copy link
Copy Markdown
Member

holmanb commented Jul 11, 2022

@holmanb Done!

My apologies, I should have mentioned that the file is in alphabetical order, could you please make that change?

  • I have confirmed CLA signature, thanks!

@SadeghHayeri
Copy link
Copy Markdown
Contributor Author

Done.
I also fix the orders.

@holmanb holmanb self-assigned this Jul 12, 2022
Copy link
Copy Markdown
Contributor

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SadeghHayeri , there was still a black formatting failure that I took the liberty of fixing. If everything passes now, we'll go ahead and merge. Thanks for the contribution!

@TheRealFalcon TheRealFalcon merged commit e0416cd into canonical:main Jul 12, 2022
cjp256 added a commit to cjp256/cloud-init that referenced this pull request Jul 14, 2022
cjp256 added a commit to cjp256/cloud-init that referenced this pull request Jul 14, 2022
The password is still set for the default (admin) user but isn't
immediately expired as a result of this change:
canonical#1577

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
cjp256 added a commit to cjp256/cloud-init that referenced this pull request Jul 14, 2022
The password is still set for the default (admin) user but isn't
immediately expired as a result of this change:
canonical#1577

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
blackboxsw pushed a commit that referenced this pull request Jul 21, 2022
Use `hashed_passwd` instead of `passwd`.
The password is still set for the default (admin) user but isn't
immediately expired as a result of this change:
#1577

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants