Bug 1578538

Summary: Virt-who configuration script fails due to username having a special character "$" in it.
Product: Red Hat Satellite Reporter: Skip Wyatt <awyatt>
Component: Virt-who Configure PluginAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact: satellite-doc-list
Priority: unspecified    
Version: 6.3.1CC: ajoseph, ehelms, gsapienz, mhulan, tstrachota
Target Milestone: 6.4.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman_virt_who_configure-0.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:09:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Skip Wyatt 2018-05-15 20:04:48 UTC
Description of problem:
When using the virt who-configuration tool, the configuration script will fail to parse the username field properly when the username is a Windows Domain user and starts with a '$' as follows:

domain\$atellite


Version-Release number of selected component (if applicable):

Satellite 6.3.1

How reproducible:

Repeatable

Steps to Reproduce:
1. Execute the virt-who configuration utility
2. Enter username domain\$atellite
3. Execute script output on the Satellite

Actual results:
User name is mangled and the password is encrypted incorrectly.

Expected results:
username is stored properly and password is retrievable via hash.

Additional info:
The user name may be manually input and configured and the password hashed via virt-who-password and this configuration will work.

Comment 2 Marek Hulan 2018-05-18 11:44:10 UTC
Created redmine issue http://projects.theforeman.org/issues/23638 from this bug

Comment 4 jcallaha 2018-06-26 18:34:33 UTC
Verified in Satellite 6.4 Snap 9

I followed the reporter's reproduction steps.

Resulting config is:
/etc/virt-who.d/virt-who-config-1.conf

### This configuration file is managed via the virt-who configure plugin
### manual edits will be deleted.
[virt-who-config-1]
type=esx
hypervisor_id=hostname
owner=Default_Organization
env=Library
server=test.server.com
username=domain\$atellite
encrypted_password=f931434859f3ea195b6ef6303d5a809b
rhsm_hostname=<my.sat.domain.com>
rhsm_username=virt_who_reporter_1
rhsm_encrypted_password=4def7ba2155a8f6eebde0c6650aaad5e7f9d5bf8762b6d66890620384a0d515a
rhsm_prefix=/rhsm

Comment 7 Bryan Kearney 2018-10-16 19:09:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927