Bug 1627830

Summary: CLI Creating a new user with LDAP needs to add password
Product: Red Hat Satellite Reporter: Sanket Jagtap <sjagtap>
Component: Users & RolesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: dhlavacd, mbacovsk, mhulan
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-12 05:46:15 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 Sanket Jagtap 2018-09-11 16:01:17 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1. Create a new users choosing LDAP on satellite through CLI 
2. A password should be passed even if it is unnecessary as it won't be used 
Satellite cannot write to ldap

 hammer user create --auth-source-id 3 --firstname foobar --login foobar --mail 'foobar' --roles 'Viewer'
Could not create the user:
  Missing arguments for 'user[password]'
[root@qe-testing-rhel7 ~]# hammer user create --auth-source-id 3 --firstname foobar --login foobar --mail 'foobar' --roles 'Viewer' --password apple
User [foobar] created.

Actual results:
If auth-source is specified , user still need to add password to create user 

Expected results:
When auth-source is specified user should not need to add password to create user

Additional info:

Comment 2 Marek Hulan 2018-09-11 16:56:23 UTC
Martin, is this easily doable in hammer and does it fit to how hammer works? Basically the option would be optional and only required when auth source is internal.

Sanket, would you be fine with keeping the --pasword option but make it optional? We'd just mention in documentation it's required for internal auth sources.

Comment 3 Sanket Jagtap 2018-09-11 17:45:59 UTC
Yes, password should be optional for the auth sources that are external , and user should be created without specifying it.

Comment 4 Marek Hulan 2018-09-12 05:46:15 UTC
Seems it was already reported, closing as dup

*** This bug has been marked as a duplicate of bug 1561691 ***

Comment 5 Martin Bacovsky 2018-10-16 07:54:54 UTC
I prefer to have this fixed on the API side. The original bug has proper fix in API doc.