sources/azure: don't set cfg["password"] for default user pw#1592
Conversation
|
Actually this may still be a problem if the user already exists in the image based on: #671 |
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>
58068bb to
6ec3e58
Compare
|
@cjp256 I believe if you use Looking specifically at https://github.com/canonical/cloud-init/blob/main/cloudinit/distros/__init__.py#L636
|
| defuser["passwd"] = cfg["password"] = encrypt_pass( | ||
| ovf_env.password | ||
| ) | ||
| defuser["passwd"] = encrypt_pass(ovf_env.password) |
There was a problem hiding this comment.
@TheRealFalcon so is this really just the suggestion then below?
| defuser["passwd"] = encrypt_pass(ovf_env.password) | |
| defuser["hashed_passwd"] = encrypt_pass(ovf_env.password) |
|
I took the liberty of pushing the suggested change to this branch. @anhvoms , do you happen to have any context for these changes. Particular this comment related to this PR? We're thinking the changes here should fix the issue mentioned by cjp256. Is there any way you can confirm so we don't continue to break Azure functionality? |
I had a discussion last week with Christopher and I am aware of the issue. I will get this tested and update back next week |
|
@TheRealFalcon @blackboxsw I have tested this change and it's working as expected for both scenarios (new user with password, existing user with password) |
blackboxsw
left a comment
There was a problem hiding this comment.
Thanks @anhvoms confirmed on our side too this appears to work as expected using 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