[Solved] Locked out of admin web UI (it asks for username); documentation does not help

:uk:/:us: Message template (english)

I cannot no longer log into admin web UI; it started to ask me for username, and I have no idea what it should be.

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.1.13 (according to sudo yunohost --version; yunohost-admin is at 11.1.7; moulinette and ssowat are at 11.1.4)
I have access to my server : direct access via keyboard / screen (KVM)
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I’m trying to log into admin UI (via https://my_domain/yunohost/admin), and it asks me for a username and password. This is definitely an admin log in page because it has a “User interface” button in its top right corner, it looks how I remember admin UI login page to look, and user login page https://my_domain/yunohost login looks entirely different.

I have no idea what the “username” should be. If I remember correctly, it never asked me for “username” before, I only ever needed to enter my yunohost admin password. I tried “admin” and “root” and “yunohost”, neither works.

In the documentation, it says to use yunohost tools adminpw to reset the admin password. However, yunohost tools adminpw tells me: “invalid choice: ‘adminpw’ (choose from ‘rootpw’, ‘maindomain’, ‘postinstall’, ‘update’, ‘upgrade’, ‘shell’, ‘shutdown’, ‘regen-conf’, ‘versions’, ‘migrations’)”.
I couldn’t find any references to “rootpw” in documentation, and it is not clear whether this changes admin UI password or Linux root password, but according to yunohost tools rootpw --help it only accepts a password, and I know the admin UI password, the only thing I don’t know is username.

I’ve upgraded to yunohost v11 from yunohost v4 a couple of months ago, but IIRC immediately after upgrade I successfully logged into admin UI using password only, so not sure if this is related.

hello
Since yunohost v11.1, you have to connect to the web admin with the first user account you created at the installation of your yunohost instance.

Related announcement thread: YunoHost 11.1 release / Sortie de YunoHost 11.1

Thank you!

I definitely did not remove the admin user though (maybe some migration removed it?), so, according to that link, it looks like I should be able to log in using admin as username and original admin password? Yet it does not let me in.

I just tried to log into web admin with the username and password of the first user I’ve created when I originally installed yunohost years ago, and it tells me “wrong password or username”. Both username and password are definitely correct (I can log into user interface with them), so apparently this user does not have admin privileges.

I’ve also checked yunohost user list, and it only lists the ordinary user accounts I’ve created manually before.
And yunohost user group list only reports two groups: all_users and visitors. It looks like I don’t have admins group.

(The link also mentions issues with 11.1.1 release, but I don’t think I ever installed it; my system was on v4 for a long time before I finally upgraded it this March. IIRC I had to upgrade to the latest v4 first, but after that IIRC it was a single-step upgrade to the latest v11.)

Turns out migration 0026_new_admins_group didn’t run successfully because postmaster@my_domain mail alias was already in use. So I got the new login page (the one that requires an username), but not admin user or admins group.

Solved this by identifying the user this alias belongs to (yunohost user list --fields mail-alias), removing the alias from it (yunohost user update user_name --remove-mailalias postmaster@my_domain), and rerunning migrations (yunohost tools migrations run).

Now I can log into admin US using admin as an username and original admin password.

1 Like

That one is such a pain in the ass, I had problems like that as well, had to remove those email aliases… Many admins should run into this problem, because who would not setup such accounts “admin@, webmaster@, postmaster@”.

Sorry I had to add that, it also did cost me an hour of my life.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.