Project

General

Profile

Bug #4156

Creating new users fail with a 401

Added by Og Maciel over 5 years ago. Updated over 5 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Our automation has stumbled upon the following issue while creating new users:

LANG=en_US hammer -v -u admin -p changeme user create --firstname='8p956aqb' --lastname='7jdvjb' --mail='tqzuibb@example.com' --login='tqzuibb' --password='bh4s9rwa' --auth-source-id=1

[ INFO 2014-01-21 16:13:30 Init] Configuration from the file /etc/foreman/cli_config.yml has been loaded
[ INFO 2014-01-21 16:13:30 Modules] Extension module hammer_cli_foreman (0.0.15) loaded
[ INFO 2014-01-21 16:13:30 HammerCLI::MainCommand] Called with options: {"username"=>"admin", "verbose"=>true, "password"=>"***"}
[ INFO 2014-01-21 16:13:30 HammerCLIForeman::User] Called with options: {}
[ INFO 2014-01-21 16:13:30 HammerCLIForeman::User::CreateCommand] Called with options: {"mail"=>"tqzuibb@example.com", "password"=>"***", "firstname"=>"8p956aqb", "login"=>"tqzuibb", "auth_source_id"=>"1", "lastname"=>"7jdvjb"}
[ERROR 2014-01-21 16:13:31 Exception] Invalid username or password
Could not create the user:
  Invalid username or password
[ERROR 2014-01-21 16:13:31 Exception]

Started POST "/api/users" for 10.16.45.160 at 2014-01-21 16:13:30 -0500
Processing by Api::V2::UsersController#create as JSON
  Parameters: {"user"=>{"mail"=>"tqzuibb@example.com", "password"=>"[FILTERED]", "firstname"=>"8p956aqb", "login"=>"tqzuibb", "auth_source_id"=>"1", "lastname"=>"7jdvjb"}, "apiv"=>"v2"}
invalid user
SSO failed
  Rendered api/v2/errors/unauthorized.json.rabl (0.5ms)
Filter chain halted as :authorize rendered or redirected
Completed 401 Unauthorized in 5ms (Views: 1.2ms | ActiveRecord: 0.9ms)

Related issues

Is duplicate of Hammer CLI - Bug #3948: Cant update user dataClosed2014-01-06

History

#1 Updated by Dominic Cleal over 5 years ago

  • Is duplicate of Bug #3948: Cant update user data added

#2 Updated by Dominic Cleal over 5 years ago

  • Status changed from New to Duplicate

Fixed in hammer_cli_foreman 0.0.16.

#3 Updated by Og Maciel over 5 years ago

I can confirm that hammer_cli_foreman 0.0.16 does fix the user creation issue.

Also available in: Atom PDF