chpasswd: is mangling certain password hashes

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

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)
description: updated
Chad Smith (chad.smith)
Changed in cloud-init (Ubuntu):
status: New → In Progress
Changed in cloud-init:
status: New → In Progress
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

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)
Changed in cloud-init (Ubuntu):
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 18.5-17-gd1a2fe73-0ubuntu1

cloud-init (18.5-17-gd1a2fe73-0ubuntu1) disco; urgency=medium

  * New upstream snapshot.
    - opennebula: exclude EPOCHREALTIME as known bash env variable with a
      delta (LP: #1813383)
    - tox: fix disco httpretty dependencies for py37 (LP: #1813361)
    - run-container: uncomment baseurl in yum.repos.d/*.repo when using a
      proxy [Paride Legovini]
    - lxd: install zfs-linux instead of zfs meta package
      [Johnson Shi] (LP: #1799779)
    - net/sysconfig: do not write a resolv.conf file with only the header.
      [Robert Schweikert]
    - net: Make sysconfig renderer compatible with Network Manager.
      [Eduardo Otubo]
    - cc_set_passwords: Fix regex when parsing hashed passwords
      [Marlin Cremers] (LP: #1811446)
    - net: Wait for dhclient to daemonize before reading lease file
      [Jason Zions] (LP: #1794399)
    - [Azure] Increase retries when talking to Wireserver during metadata walk
      [Jason Zions]
    - Add documentation on adding a datasource.
    - doc: clean up some datasource documentation.
    - ds-identify: fix wrong variable name in ovf_vmware_transport_guestinfo.
    - Scaleway: Support ssh keys provided inside an instance tag. [PORTE Loïc]
    - OVF: simplify expected return values of transport functions.
    - Vmware: Add support for the com.vmware.guestInfo OVF transport.
      (LP: #1807466)
    - HACKING.rst: change contact info to Josh Powers

 -- Chad Smith <email address hidden> Sat, 26 Jan 2019 08:27:35 -0700

Changed in cloud-init (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Chad Smith (chad.smith) wrote : Fixed in cloud-init version 19.1.

This bug is believed to be fixed in cloud-init in version 19.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.