Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1110337

Summary: user management through hammer not working
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: Content ManagementAssignee: Tom McKay <tomckay>
Status: CLOSED CURRENTRELEASE QA Contact: Tazim Kolhar <tkolhar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.3CC: bbuckingham, cwelton, jmontleo, tkolhar
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/6003
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-02 14:04:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tom McKay 2014-06-17 13:04:21 UTC
Created a new user to manage Katello/Foreman.

The following command produces and error:

# hammer -u admin -p changeme user list
undefined method `key?' for #<JSON::Ext::Generator::State:0x0000000e782a68>

When performing a user info, I can get the first two (admin and a hidden user that I don't know how it was created). The rest of the users info fail with an error:

# hammer -u admin -p changeme user info --id 1
Id:            1
Login:         admin
Name:          Admin User
Email:         root
Admin:         yes
Authorized by: Internal
Last login:    2014/05/30 20:09:43
Created at:    2014/05/29 16:49:01
Updated at:    2014/05/30 20:09:43

# hammer -u admin -p changeme user info --id 2
Id:            2
Login:         hidden-0zd9qe
Name:           
Email:         sm79ogUAtw@localhost
Admin:         no
Authorized by: Internal
Last login:    
Created at:    2014/05/29 16:49:04
Updated at:    2014/05/29 16:49:04

# hammer -u admin -p changeme user info --id 3
undefined method `key?' for #<JSON::Ext::Generator::State:0x000000102d9c80>

Comment 1 Tom McKay 2014-06-17 13:04:22 UTC
Created from redmine issue http://projects.theforeman.org/issues/6003

Comment 2 Tom McKay 2014-06-17 13:04:27 UTC
Upstream bug assigned to tomckay

Comment 4 Bryan Kearney 2014-06-19 16:04:56 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6003 has been closed

Comment 7 Tazim Kolhar 2014-06-20 07:49:58 UTC
VERIFIED

[root@hp-dl360g5-01 ~]# hammer user info --id 1
Id:            1
Login:         admin
Name:          Admin User
Email:         root.bos.redhat.com
Admin:         yes
Authorized by: Internal
Last login:    2014/06/20 07:48:57
Created at:    2014/06/20 06:45:54
Updated at:    2014/06/20 07:48:57

[root@hp-dl360g5-01 ~]# hammer user info --id 2
Id:            2
Login:         hidden-wvpqj5
Name:           
Email:         j2zJ331uG2@localhost
Admin:         no
Authorized by: Internal
Last login:    
Created at:    2014/06/20 06:45:59
Updated at:    2014/06/20 06:45:59

[root@hp-dl360g5-01 ~]# hammer user info --id 3
Id:            3
Login:         testuser
Name:          test user
Email:         testuser
Admin:         no
Authorized by: Internal
Last login:    
Organizations: 
    ACME_Corporation
Created at:    2014/06/20 07:47:26
Updated at:    2014/06/20 07:47:26

Comment 8 Bryan Kearney 2014-07-02 14:04:52 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.