chpasswd: is mangling certain password hashes

Bug #1811446 reported by Ryan Harper on 2019-01-11
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)

Bug Description


# from 1 files
# part-001

    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_> I can confirm this when running it through
<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:
<smoser> marlinc_: i'd think yes. that is a bug for the '2a' and '2y'

Related branches

Marlin Cremers (marlinc) on 2019-01-11
description: updated
Chad Smith (chad.smith) on 2019-01-15
Changed in cloud-init (Ubuntu):
status: New → In Progress
Changed in cloud-init:
status: New → In Progress

This bug is fixed with commit ad170db9 to cloud-init on branch master.
To view that commit see the following URL:

Changed in cloud-init:
status: In Progress → Fix Committed
Marlin Cremers (marlinc) on 2019-01-15
Changed in cloud-init (Ubuntu):
status: In Progress → Fix Committed
status: Fix Committed → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers