User passwords like "Pa55w0rd!&" fail to be set.

Bug #1404533 reported by Adrian Vladu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloudbase-init
Fix Released
Medium
Alessandro Pilotti

Bug Description

If a user password that contains a '&' in it is being sent via the metadata service, then the password fails to be set.

For example: Pa55w0rd!& fails to be set as it is, the '&' character is stripped out.

The problem is that the string escaping is not performed for Windows cmd here:
https://github.com/stackforge/cloudbase-init/blob/master/cloudbaseinit/plugins/windows/setuserpassword.py#L85
https://github.com/stackforge/cloudbase-init/blob/master/cloudbaseinit/osutils/windows.py#L331

Adrian Vladu (avladu)
summary: - User passwords like "Pa55w0rd!&" fails to be set.
+ User passwords like "Pa55w0rd!&" fail to be set.
Changed in cloudbase-init:
status: New → Triaged
importance: Undecided → High
importance: High → Medium
Revision history for this message
Alessandro Pilotti (alexpilotti) wrote :

Btw I want to replace since a while that "net user add" with:

 [ADSI]("WinNT://./Administrator,user")

This will also solve any password escaping issue.

Changed in cloudbase-init:
assignee: nobody → Alessandro Pilotti (alexpilotti)
Changed in cloudbase-init:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cloudbase-init (master)

Reviewed: https://review.openstack.org/143320
Committed: https://git.openstack.org/cgit/stackforge/cloudbase-init/commit/?id=414fd1116c521b2f9598f89c7d48b004fbff516e
Submitter: Jenkins
Branch: master

commit 414fd1116c521b2f9598f89c7d48b004fbff516e
Author: Alessandro Pilotti <email address hidden>
Date: Sun Dec 21 22:50:21 2014 +0100

    Adds ADSI based Windows user management

    Replaces the Windows user creation and password management
    implementation from "NET USER" execution to ADSI COM usage.

    Change-Id: I4f95b094c95abb11762943afdb4be26541493159
    Closes-Bug: #1404533

Changed in cloudbase-init:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cloudbase-init (master)

Change abandoned by Alessandro Pilotti (<email address hidden>) on branch: master
Review: https://review.openstack.org/143277
Reason: Already fixed in
https://review.openstack.org/143320

Changed in cloudbase-init:
status: Fix Committed → Fix Released
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.