Bug 1490969

Summary: Unable to change the default Satellite username "admin-username"
Product: Red Hat Satellite Reporter: Gilbert Kimetto <gkimetto>
Component: Users & RolesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: low    
Version: 6.2.11CC: dhlavacd, gkimetto, mhulan
Target Milestone: 6.4.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:10:26 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:
Attachments:
Description Flags
After install change name
none
After Submit none

Description Gilbert Kimetto 2017-09-12 15:54:48 UTC
Description of problem:

-After initial setup I attempted to change the default user 
  name and password from "admin-username" and "admin-password" 
-From the GUI I can change the username and password but as soon as I hit submit the username returns to "admin-username"
 
Version-Release number of selected component (if applicable):
Satellite 6.2.11

How reproducible:
 Easily Reproducible

Steps to Reproduce:
1. After new install of RedHat Satellite 6.2.11 attempt to change username
2. Hit Submit when username and password changed
3. The username returns to the old "admin-username"

Actual results:


Expected results:
Expected the username to update to the new name.
Logging out and logging back in does not matter.

Additional info:

Comment 1 Marek Hulan 2017-09-19 15:12:55 UTC
Do you mean the default username "admin"? In Sat 6.2.12 the username field is disabled, the same applies to 6.2.10. I don't have the 6.2.11 at hand, would you mind uploading a screen if it's not the case in 6.2.11?

Did you perhaps changed the admin name by passing to --foreman-admin-username satellite-installer?

Comment 2 Gilbert Kimetto 2017-09-28 13:34:41 UTC
Hi Marek
I had 3 Satellite VMs with 6.2.11. I am no longer able to update the "Username" field as before and now the default user is "admin" and greyed out. 

If you want to take a look around its 10.19.231.248 {admin/redhat}

Comment 5 Marek Hulan 2017-10-10 09:46:44 UTC
So what is the issue then? In comment 0 you said you can change the username, in comment 2 you say the field is disabled. How do you try to change the username then? On instance you provided I see the text field disabled.

Comment 6 Gilbert Kimetto 2017-10-10 15:38:14 UTC
Hi Marek
This happened immediately after I did the install. I used the name "admin-username" for a while then decided to change it. I am not sure when/how the field changed to "admin" disabled. I will try to reproduce this when I do another 6.2.11

Comment 7 Marek Hulan 2017-10-11 10:37:59 UTC
I think the only way to achieve this is to change the admin name on initial installation by doing

> satellite-installer --foreman-admin-username admin-username

as suggested in comment 1.

If that's the case, we should change the way how we detect the default admin account when we decide whether the username field should be editable, right now we disable the field on if login == 'admin'.

I'd say this is low prio though, the installer parameter is rarely used.

Comment 8 Gilbert Kimetto 2017-10-13 17:29:37 UTC
Created attachment 1338311 [details]
After install change name

Right after the install where I used the foreman CLI command to install and create a user gk-admin. I loginto the GUI and attempt to change the name to admin. When I save the name remains as "gk-admin"

Comment 9 Gilbert Kimetto 2017-10-13 17:30:34 UTC
Created attachment 1338312 [details]
After Submit

Comment 10 Marek Hulan 2017-10-16 06:51:28 UTC
Gilbert, foreman CLI is hammer, did you use hammer or satellite-installer to set a user name to gk-admin?

Comment 11 Gilbert Kimetto 2017-10-16 13:22:20 UTC
This is the command used from my history (Following the 6.2 Install Guide):

satellite-installer --scenario satellite --foreman-initial-organization "gkm8o_org" --foreman-initial-location "Kericho" --foreman-admin-username gk-admin --foreman-admin-password redhat --foreman-proxy-dns-managed=false --foreman-proxy-dhcp-managed=false

Comment 12 Marek Hulan 2017-10-17 07:06:50 UTC
Ok, thanks, so my guess in comment 1 was correct. Thanks for confirmation.

Comment 13 Marek Hulan 2017-10-17 07:10:20 UTC
Created redmine issue http://projects.theforeman.org/issues/21353 from this bug

Comment 14 Satellite Program 2017-11-28 17:04:02 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21353 has been resolved.

Comment 15 Peter Ondrejka 2018-06-06 08:02:09 UTC
verified on Sat 6.3 snap 6

Comment 16 Bryan Kearney 2018-10-16 19:10:26 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