Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 878544

Summary: katello-configure does not create the default admin user when --user-name is used
Product: [Retired] Subscription Asset Manager Reporter: Jordan OMara <jomara>
Component: katello-configureAssignee: Jordan OMara <jomara>
Status: CLOSED NOTABUG QA Contact: SAM QE List <sam-qe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.2CC: athomas, omaciel, tomckay
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 878543 Environment:
Last Closed: 2012-11-20 23:54:07 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:
Bug Depends On: 878543    
Bug Blocks: 816564    

Description Jordan OMara 2012-11-20 16:38:04 UTC
+++ This bug was initially created as a clone of Bug #878543 +++

Description of problem:

While configuring my headpin/katello system to use LDAP, if I specify the default user name for the admin user during the configuration using --user-name, the default administrator user is created as "admin", completely ignoring the one I passed as an argument.

Also, note that the password for the admin user is displayed as plain text... it should be a hash of some type.

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


How reproducible:


Steps to Reproduce:
1. katello-configure --deployment=headpin --user-name=Administrator --user-email=foo --org-name='CFSE QE' --ldap-server=********* --auth-method=ldap --ldap-port=389 --ldap-server-type='active_directory' --ldap-users-basedn='*******' --ldap-roles=true --ldap-anon-queries=false --ldap-service-user='Administrator' --ldap-service-pass='******' --ldap-ad-domain='win-ads.redhat.com'
2. Login as Administrator and use the LDAP password for this user
3.
  
Actual results:

The user can login but does not have admin priviledge

Expected results:

User Administrator should be the default admin user with all access


Additional info:

# RAILS_ENV=production RAILS_RELATIVE_URL_ROOT=/headpin rails console
Loading production environment (Rails 3.0.10)
irb(main):001:0> User.all
=> [#<User id: 1, username: "admin", password: "admin", helptips_enabled: true, hidden: false, created_at: "2012-11-20 16:05:40", updated_at: "2012-11-20 16:05:40", own_role_id: 3, page_size: 25, disabled: false, email: "omaciel", password_reset_token: nil, password_reset_sent_at: nil, preferences: {}, foreman_id: nil>, #<User id: 2, username: "hidden-KupQJK", password: "**********", helptips_enabled: true, hidden: true, created_at: "2012-11-20 16:05:40", updated_at: "2012-11-20 16:05:40", own_role_id: 4, page_size: 25, disabled: false, email: "rtiZeVckrH@localhost", password_reset_token: nil, password_reset_sent_at: nil, preferences: {}, foreman_id: nil>, #<User id: 3, username: "Administrator", password: nil, helptips_enabled: true, hidden: false, created_at: "2012-11-20 16:07:40", updated_at: "2012-11-20 16:07:40", own_role_id: 5, page_size: 25, disabled: false, email: nil, password_reset_token: nil, password_reset_sent_at: nil, preferences: {}, foreman_id: nil>]

Comment 3 Og Maciel 2012-11-20 18:31:51 UTC
u.save