Project

General

Profile

Actions

Bug #3961

closed

user create command fails: "Invalid username or password"

Added by Garik Khachikyan over 10 years ago. Updated over 10 years ago.

Status:
Duplicate
Priority:
High
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
medium
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

recent hammer CLI fails on `hammer user create --login=test --password=test --firstname=Garik --lastname=Khachikyan --mail='some@localhost' --auth-source-id=1` with:
Could not create the user:
Invalid username or password

versions are:
rubygem-foreman_api-0.1.9-1.el6.noarch
foreman-compute-1.4.0-0.develop.201401071212git9ef39dd.el6.noarch
foreman-libvirt-1.4.0-0.develop.201401071212git9ef39dd.el6.noarch
foreman-postgresql-1.4.0-0.develop.201401071212git9ef39dd.el6.noarch
foreman-selinux-1.4.0-0.develop.201311220906gite342a0b.el6.noarch
rubygem-hammer_cli_foreman-0.0.15-1.el6.noarch
foreman-1.4.0-0.develop.201401071212git9ef39dd.el6.noarch
foreman-ovirt-1.4.0-0.develop.201401071212git9ef39dd.el6.noarch
foreman-installer-1.4.0-0.develop.201401031335gitf3eee21.el6.noarch
foreman-release-1.4.0-0.develop.201401071212git9ef39dd.el6.noarch
foreman-proxy-1.4.0-0.develop.201401031522gitd3509e6.el6.noarch

traceback with -v is: ===
[ INFO 2014-01-07 08:32:38 Init] Initialization of Hammer CLI (0.0.14) has started...
[ INFO 2014-01-07 08:32:38 Init] Configuration from the file /etc/foreman/cli_config.yml has been loaded
[ INFO 2014-01-07 08:32:39 Modules] Extension module hammer_cli_foreman (0.0.15) loaded
[ INFO 2014-01-07 08:32:39 HammerCLI::MainCommand] Called with options: {"verbose"=>true}
[ INFO 2014-01-07 08:32:39 HammerCLIForeman::User] Called with options: {}
[ INFO 2014-01-07 08:32:39 HammerCLIForeman::User::CreateCommand] Called with options: {"firstname"=>"Garik", "auth_source_id"=>"1", "lastname"=>"Khachikyan", "password"=>"***", "mail"=>"some@localhost", "login"=>"test"}
[ERROR 2014-01-07 08:32:39 Exception] Invalid username or password
Could not create the user:
Invalid username or password
[ERROR 2014-01-07 08:32:39 Exception]

RestClient::Request::Unauthorized (401 Unauthorized):
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:220:in `process_result'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `transmit'
/usr/lib/ruby/1.8/net/http.rb:543:in `start'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/resource.rb:63:in `post'
/usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/base.rb:78:in `send'
/usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/base.rb:78:in `http_call'
/usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/base.rb:61:in `perform_call'
/usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/resources/user.rb:43:in `create'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/./apipie/resource.rb:38:in `send'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/./apipie/resource.rb:38:in `call'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.15/lib/hammer_cli_foreman/commands.rb:34:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/./apipie/write_command.rb:10:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/bin/hammer:61
/usr/bin/hammer:19:in `load'
/usr/bin/hammer:19

Actions #1

Updated by Garik Khachikyan over 10 years ago

# comment

update command fails with the same cause (user prepared via UI):

[root@demeter ~]# hammer -v user update --mail root@localhost --id garik
[ INFO 2014-01-07 08:59:07 Init] Initialization of Hammer CLI (0.0.14) has started...
[ INFO 2014-01-07 08:59:07 Init] Configuration from the file /etc/foreman/cli_config.yml has been loaded
[ INFO 2014-01-07 08:59:07 Modules] Extension module hammer_cli_foreman (0.0.15) loaded
[ INFO 2014-01-07 08:59:07 HammerCLI::MainCommand] Called with options: {"verbose"=>true}
[ INFO 2014-01-07 08:59:07 HammerCLIForeman::User] Called with options: {}
[ INFO 2014-01-07 08:59:07 HammerCLIForeman::User::UpdateCommand] Called with options: {"id"=>"garik", "mail"=>"root@localhost"}
[ERROR 2014-01-07 08:59:07 Exception] Invalid username or password
Could not update the user:
Invalid username or password
[ERROR 2014-01-07 08:59:07 Exception]

RestClient::Request::Unauthorized (401 Unauthorized):
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:220:in `process_result'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `transmit'
/usr/lib/ruby/1.8/net/http.rb:543:in `start'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/resource.rb:72:in `put'
/usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/base.rb:78:in `send'
/usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/base.rb:78:in `http_call'
/usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/base.rb:61:in `perform_call'
/usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/resources/user.rb:60:in `update'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/./apipie/resource.rb:38:in `send'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/./apipie/resource.rb:38:in `call'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.15/lib/hammer_cli_foreman/commands.rb:34:in `send_request'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/./apipie/write_command.rb:10:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/bin/hammer:61
/usr/bin/hammer:19:in `load'
/usr/bin/hammer:19

Actions #2

Updated by Garik Khachikyan over 10 years ago

failures growing:

hammer -u admin -p <pwd> compute_resource create --name='znpg9z81' --provider='Libvirt' --url='qemu+tcp://localhost:16509/system' - same error :/

Actions #3

Updated by Tomáš Strachota over 10 years ago

  • Status changed from New to Duplicate

DUplicate of #3948, closing.

Actions

Also available in: Atom PDF