Failing to reset the web admin password

Hello, running Foreman 1.9.3. I’m unable to reset the “admin” account password for the Web login. I’ve tried the following:

  1. foreman-rake permissions:reset PASSWORD=changeme
  2. foreman-installer --foreman-admin-password=changeme

Neither one of these worked. In the logs, I can see this when I attempt to use the new creds:

Started POST “/users/login” for at 2019-01-02 22:27:17 +0000
2019-01-02 22:27:17 [app] [I] Processing by UsersController#login as HTML
2019-01-02 22:27:17 [app] [I] Parameters: {“utf8”=>“✓”, “authenticity_token”=>“JgJrxBDTd4qqbZydfuO+CILu+0xWvO053Wt0pCVjz+8=”, “login”=>{“login”=>“admin”, “password”=>"[FILTERED]"}, “commit”=>“Login”}
2019-01-02 22:27:17 [sql] [I] invalid user
2019-01-02 22:27:17 [app] [I] Redirected to https:///users/login
2019-01-02 22:27:17 [app] [I] Completed 302 Found in 24ms (ActiveRecord: 3.9ms)
2019-01-02 22:27:17 [app] [I]

I know that admin is not an invalid user because both commands above work without issue and output the name “admin” for the user whose password was reset. The only thing I can think of is I know this instance is tied to AD and I’m wondering if its trying to auth using LDAP and not locally? I’m sortof a newb at this so any help is very much appreciated.

Hello,

Check if admin user has set to be authenticated against ‘Internal’ AuthSource,

foreman-rake console

User.all.where(:login => ‘admin’).select(:auth_source_id, :id)
=> #<ActiveRecord::Relation [#<User id: 4, auth_source_id: 1, password: nil>]>

In below command you need to change 1 with auth_source_id you have got for admin user,

AuthSource.all.where(:id => 1).select(:id, :name)
=> #<ActiveRecord::Relation [#<AuthSource id: 1, name: “Internal”>]>

If its not internal then it should be getting authenticated by external auth and should be failing there, in this case you can check any other user which has admin rights and then use that for login and maybe if you wish change admin user auth source to internal.