Project

General

Profile

Actions

Bug #24301

closed

Creating user with hammer having authentication source LDAP/AD should not ask for password

Added by Daniel Lobato Garcia over 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Description of problem:
When creating a user on Foreman 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.

How reproducible: Always

Steps to Reproduce:
Create user without password parameter:
  1. hammer user create --auth-source-id 3 --firstname Tom --lastname Mathew --login tom123 --mail '' --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:
    1. hammer user create --auth-source-id 3 --firstname Tom --lastname Mathew --login tom123 --mail '' --roles 'Access Insights Viewer,Customized Viewer,Red Hat Access Logs,Tasks Reader,View hosts' --password "redhat"
      User [cmn01] created
  1. hammer user list
    ---|---------------|------------------|------------------------|-------|---------------------|--------------
    ID | LOGIN | NAME | EMAIL | ADMIN | LAST LOGIN | AUTHORIZED BY
    ---|---------------|------------------|------------------------|-------|---------------------|--------------
    7 | tom123 |Tom Mathew | | 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:

Actions

Also available in: Atom PDF