Public bug reported: #cloud-config
# from 1 files # part-001 --- chpasswd: expire: false list: 'root:$2y$10$8BQjxjVByHA/Ee.O1bCXtO8S7Y5WojbXWqnqYpUW.BrPx/Dlew1Va ' >From #cloud-init <marlinc_> Hey there, I'm not sure whether I'm running into a bug or not <marlinc_> I'm trying to set the password hash for the root user on a system using the chpasswd module <marlinc_> It should match new hash at this line in the module but it doens't seem to match <marlinc_> https://github.com/cloud-init/cloud-init/blame/master/cloudinit/config/cc_set_passwords.py#L163 <marlinc_> I can confirm this when running it through https://regex101.com/r/Nj7VTZ/1 <marlinc_> Then I was thinking, isn't [] for lists of characters rather than lists of strings <marlinc_> Changing it to \$(1|2a|2y|5|6)(\$.+){2} does work <marlinc_> At least in regex101 <marlinc_> smoser, you any idea, I saw you commited the change: https://github.com/cloud-init/cloud-init/commit/21632972df034c200578e1fbc121a07f20bb8774 <smoser> marlinc_: i'd think yes. that is a bug for the '2a' and '2y' ** Affects: cloud-init Importance: Undecided Status: New ** Merge proposal linked: https://code.launchpad.net/~marlinc/cloud-init/+git/cloud-init/+merge/361683 -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to cloud-init. https://bugs.launchpad.net/bugs/1811446 Title: chpasswd: is mangling certain password hashes Status in cloud-init: New Bug description: #cloud-config # from 1 files # part-001 --- chpasswd: expire: false list: 'root:$2y$10$8BQjxjVByHA/Ee.O1bCXtO8S7Y5WojbXWqnqYpUW.BrPx/Dlew1Va ' From #cloud-init <marlinc_> Hey there, I'm not sure whether I'm running into a bug or not <marlinc_> I'm trying to set the password hash for the root user on a system using the chpasswd module <marlinc_> It should match new hash at this line in the module but it doens't seem to match <marlinc_> https://github.com/cloud-init/cloud-init/blame/master/cloudinit/config/cc_set_passwords.py#L163 <marlinc_> I can confirm this when running it through https://regex101.com/r/Nj7VTZ/1 <marlinc_> Then I was thinking, isn't [] for lists of characters rather than lists of strings <marlinc_> Changing it to \$(1|2a|2y|5|6)(\$.+){2} does work <marlinc_> At least in regex101 <marlinc_> smoser, you any idea, I saw you commited the change: https://github.com/cloud-init/cloud-init/commit/21632972df034c200578e1fbc121a07f20bb8774 <smoser> marlinc_: i'd think yes. that is a bug for the '2a' and '2y' To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1811446/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp