Project

General

Profile

Actions

Bug #25472

closed

foreman-maintain assumes the admin user is called admin

Added by Kavita Gaikwad over 5 years ago. Updated 2 months ago.

Status:
Rejected
Priority:
High
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1640136

Description of problem:
When deploying Foreman/Satellite, you can specify a different admin username with the --foreman-admin-username switch to the installer. By doing so, there is no "admin" user in the system after installation.

However, foreman maintain only tries to use "admin" when writing the custom config, and errors out when it can't use it.

See https://github.com/theforeman/foreman_maintain/blob/master/definitions/features/hammer.rb#L31

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

How reproducible:
100%

Steps to Reproduce:
1. install Foreman/Satellite with --foreman-admin-username bigboss
2. use foreman-maintain

Actual results:
config error is assumed and f-m aborts

Expected results:
f-m works (and asks for the right username)

Additional info:
Workaround: create a "admin" user, if Foreman/Satellite is down for some reason, you can create it directly in the DB:

echo "insert into users (login, firstname, lastname, mail, admin, auth_source_id, password_hash, password_salt, default_organization_id, lower_login, mail_enabled) values ('admin', 'admin', 'admin', 'root@localhost', true, 1, '818b6a109858fc8aac2cbc905f937dd4006c84aa', 'ab5b746dab13c619c83df529653a885709aa5fdd', 1, 'admin', true);" | sudo -u postgres psql foreman

This will create an "admin" user with "changeme" as password, don't forget to change it afterwards :)

Actions #1

Updated by Eric Helms 2 months ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF