Bug 1122124 - Unable to authenticate as admin with password of changeme
Summary: Unable to authenticate as admin with password of changeme
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: foreman-installer
Version: Foreman (RHEL 6)
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: Installer
Assignee: Mike Burns
QA Contact: Omri Hochman
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-22 15:08 UTC by John Eckersberg
Modified: 2014-09-30 22:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-09-30 22:34:26 UTC

Attachments (Terms of Use)

Description John Eckersberg 2014-07-22 15:08:47 UTC
Description of problem:
Unable to authenticate with user/admin after running foreman-installer.  I originally was hitting this using rhel-osp-installer.  It fails in puppet because it needs to authenticate over the API.  I tried using foreman-installer directly to take rhel-osp-installer/staypuft out of the picture and still end up with the same situation where I cannot authenticate as the admin user.

Version-Release number of selected component (if applicable):
[root@staypuft ~]# rpm -qa | grep foreman

How reproducible:

Steps to Reproduce:
1. Apply workaround for bug 1121697
2. Run foreman-installer -i
3. Disable configuration for foreman_plugin_bootdisk, foreman_plugin_setup (rpms not provided), so the only configuration items are: puppet, foreman, foreman_proxy.
4. Save and run

Installer completes, with the usual message, including:

  * Foreman is running at https://staypuft.example.org
      Default credentials are 'admin:changeme'

Actual results:
Trying to log in to the web UI gives "Incorrect username or password".  

Trying to authenticate in the rails console fails, although the user is present -

[root@staypuft ~]# su - foreman --shell /bin/bash
-bash-4.1$ cd /usr/share/foreman
-bash-4.1$ scl enable ruby193 'RAILS_ENV=production rails console'
Loading production environment (Rails 3.2.8)
irb(main):001:0> User.try_to_login 'admin', 'changeme'
  User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1
  AuthSource Load (0.6ms)  SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 1 LIMIT 1
  User Load (0.3ms)  SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' LIMIT 1
Failed to authenticate Admin User against INTERNAL authentication source
invalid user
=> nil
irb(main):002:0> User.find_by_login :admin
  AuthSourceHidden Load (0.4ms)  SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."type" IN ('AuthSourceHidden')
  User Load (0.3ms)  SELECT "users".* FROM "users" WHERE "users"."login" = 'admin' AND (1=1) AND (users.auth_source_id <> 2) LIMIT 1
=> #<User id: 3, login: "admin", firstname: "Admin", lastname: "User", mail: "root@example.org", admin: true, last_login_on: nil, auth_source_id: 1, created_at: "2014-07-22 14:42:56", updated_at: "2014-07-22 14:42:56", password_hash: "592b870835c3ea25a410fee40accc99fed655510", password_salt: "249aa0da0d7f20b1ce815cf7fc704e5624542b7d", domains_andor: "or", hostgroups_andor: "or", facts_andor: "or", filter_on_owner: nil, compute_resources_andor: "or", organizations_andor: "or", locations_andor: "or", subscribe_to_all_hostgroups: nil, locale: nil, avatar_hash: nil, default_organization_id: nil, default_location_id: nil>

Expected results:
Able to log in with admin/changeme

Comment 3 Mike Burns 2014-09-30 22:34:26 UTC
This change was made due to bug 979241.  Closing as wontfix

Comment 4 Mike Burns 2014-09-30 22:35:27 UTC
new password would be available in the answers file (rhel-osp-installer.answers.yaml) in /etc/foreman in the admin_password field

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