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 1561691 - Creating user with hammer having authentication source LDAP/AD should not ask for password
Summary: Creating user with hammer having authentication source LDAP/AD should not ask...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: LDAP
Version: 6.3.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: 6.5.0
Assignee: Daniel Lobato Garcia
QA Contact: Nikhil Kathole
URL:
Whiteboard:
: 1627830 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-28 17:17 UTC by Diksha Chaudhari
Modified: 2023-09-18 00:13 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:37:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24301 0 Normal Closed Creating user with hammer having authentication source LDAP/AD should not ask for password 2020-02-19 08:55:26 UTC
Red Hat Knowledge Base (Solution) 3402741 0 None None None 2018-05-16 05:53:07 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:37:12 UTC

Description Diksha Chaudhari 2018-03-28 17:17:01 UTC
Description of problem:
When creating a user on satellite 6.3 with hammer having external authentication source LDAP/AD gives an error if password not mentioned while the user gets added if password parameter is mentioned. As the user created will be authenticated with the authentication source password and not by the password provided by us while creating user, iit should not be mandatory to create user with password parameter.

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

How reproducible: Always

Steps to Reproduce:
Create user without password parameter:
# hammer user create --auth-source-id 3   --firstname Tom --lastname Mathew   --login tom123 --mail 'tom' --roles 'Access Insights Viewer,Customized Viewer,Red Hat Access Logs,Tasks Reader,View hosts' 
Could not create the user:
  Missing arguments for 'user[password]'        

      2)  Create user with password parameter:
 # hammer user create --auth-source-id 3   --firstname Tom --lastname Mathew   --login tom123 --mail 'tom' --roles 'Access Insights Viewer,Customized Viewer,Red Hat Access Logs,Tasks Reader,View hosts' --password "redhat"
User [cmn01] created       

# hammer user list 
---|---------------|------------------|------------------------|-------|---------------------|--------------
ID | LOGIN         | NAME             | EMAIL                  | ADMIN | LAST LOGIN          | AUTHORIZED BY
---|---------------|------------------|------------------------|-------|---------------------|--------------
7  | tom123        |Tom Mathew        | tom        | yes   | 2018/02/20 15:21:56 | adserver    

Actual results:
User is not allowed to create without password parameter even when we have specified the external auth source. 

Expected results:
When the user is authenticated with the external authentication source LDAP/AD then while creating a user via hammer the --password parameter should be optional.


Additional info:

Comment 3 Daniel Lobato Garcia 2018-07-19 11:45:23 UTC
Created redmine issue https://projects.theforeman.org/issues/24301 from this bug

Comment 6 Daniel Lobato Garcia 2018-08-28 21:51:10 UTC
Fix submitted, AFAIK there are no 100% proven workarounds other than creating the user in the UI. 

https://github.com/theforeman/foreman/pull/6005 

It might be possible to create an user in the internal auth source, with an useless password, then update the user's auth source to be external as a workaround.

Comment 7 Satellite Program 2018-09-01 14:17:38 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24301 has been resolved.

Comment 9 Marek Hulan 2018-09-12 05:46:15 UTC
*** Bug 1627830 has been marked as a duplicate of this bug. ***

Comment 15 Nikhil Kathole 2018-12-18 12:52:49 UTC
VERIFIED

Version tested:
Satellite 6.5 snap 8

# hammer user create --auth-source-id 15   --firstname Tom --lastname Mathew   --login tom --mail 'tom' --roles 'View hosts' 
User [tom] created.
]# hammer -u Tom -p wrong-password host list
Unable to authenticate user Tom
# hammer -u Tom -p changeme host list
---|------|------------------|------------|----|-----|---------------|--------------|----------------------
ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC | GLOBAL STATUS | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|------|------------------|------------|----|-----|---------------|--------------|----------------------


User is allowed to create without passing --password if auth source is used and successfully authenticate it from auth source.

Comment 18 errata-xmlrpc 2019-05-14 12:37:00 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-2019:1222

Comment 20 Red Hat Bugzilla 2023-09-18 00:13:24 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.