Admin page not working after enabling local auth

Admin was working fine before local auth, after local auth is enabled, when clicking on admin, it hangs at “Loading…” and never returns.
I have rebooted the server, used both firefox and chrome. no luck.
I am running a proxmox vm, with 1GB of ram, and it is a rancher os install on the vm.

When you say it was working fine, were you using a different authentication provider? We don’t really support switching between authentication providers.

Also, if there are no hosts added onto Rancher server, you might hit this issue when you enable local auth. https://github.com/rancher/rancher/issues/2051

i mean the default installation. there was a warning at the top of the screen saying authentication wasnt enabled so i enabled local auth and it was hung after making that change. I have 3 hosts in total, 1 server and 2 with agents.

Hmm, I am not really sure what it could be as I don’t have any issues with enabling local auth and going to the admin page.

@vincent Any ideas on what else could be causing the UI to have loading issues?

With regard to the issue2051 did we not have to do the following to the database

update setting set value=“true” where name=“api.security.enabled”;
update account set external_id=19, external_id_type=“rancher_id” where id=1;

Just wonder if it is same symtoms

Same here, the admin tab is not visible

I’m not sure exactly what the issues(s) are here, or that any two people are talking about the same thing… Can everyone with a problem open up the browser (preferably Chrome) Dev tools -> network tab, enable “Preserve Log”. Then do whatever causes your problem and check the network tab for failed requests or the console tab for error messages and post what you see.

Hi @vincent,

the thing is that there is a admin route where you able to manage the users for example but this tab is not visible to me. I assume for some reason is my user not equipped with the proper permissions.

Rancher	v0.40.0
Cattle	v0.97.0
User Interface	v0.54.0

Was the same with server version 0.39

@zauberertz

For some reason, the user that you have logged in as is not an admin of Rancher. Were you the one to enable authentication for Rancher or was it someone else in the company? The first account that was enabled using local auth is considered the admin. Any other users can be created and made into an admin.

Note: In previous release, there was a UI bug that could have overwritten the Admin rights of users. It won’t fix the permission issue, but will prevent for further accidental changes in Admin rights.

@denise

I Have enabled the authentication in rancher. See the screenshot of the accounts table of the rancher Database.

Any recommendations how to fix my permissions? I’m user id 1.

@zauberertz Can you also share the portion of external_id and external_id_type in the account table?

Also, can you share the result of:

select * from credential where account_id=1;

@denise

here you go:

@zauberertz Can you show me the full row of the account table?

@denise

as you wish

Sorry @zauberertz. I meant the account table that you had previously shown in the first post of the DB.

Can you provide the full row of these two statements?

select * from account where id=1;
select * from credential where account_id=1;

Here the additional queries

@zauberertz Here’s the SQL statement to change your account to an admin account.

update account set kind="admin" where id=1;

@denise, that worked. now the admin tab is visible.