[Solved] create XO account from ssh
-
Hello there.
In an unfortunate event, we lost access to our ldap server from XOA. This means that we cannot log in at all, as we've disabled the default administrator account. We cannot get the AD up and running again - and if we could, the account that XOA is using to bind to the AD cannot be recreated with the same credentials.
So the question here is: Is there any way we can get access to the XOA instance again? E.g. configure the ldap plugin using ssh or maybe create a new account?
We have SSH access to both the XOA virtual machine and both the XCP-NG nodes. The XOA virtual machine is a self build instance.
We'd be thankful for any help!
-
I completely missed that in the troubleshooting documentation but it is already there - nice
-
@bxen Maybe not the brightest idea (since I do not know what configuration might be lost), but what if you deploy a new XOA instance, connect to the master node and try to fix things from there? Obviously, this doesn't give you access to the web UI of your initial XO from the source, but you can work with the VMs or restore backups if necessary.
-
Locate the
packages/xo-server
directory to your from sources built xen orchestra instance. There should be a file indist/recover-account-cli.mjs
,copy this file asrun it from the dist directorydist/recover-account-cli.mjs
and then./recover-account-cli.mjs admin@something.tld
, it'll ask password and either reset the existing users password or create a new one with admin privileges if there isn't one with the email address. -
-
@ronivay Thank you very much. I'll try this and get back here with the result!
-
@ronivay Whoo whoo!! Yes! It worked like a charm! Thank you very much!
-
Nice Happy to help.
-
-
Yeah you're right, it indeed should be there already. I must have done something to it in my own lab
-
I completely missed that in the troubleshooting documentation but it is already there - nice
-
As @gskger siad, this was already documented and visible by searching the term "recover" in the search bar
-
-
-
@gskger said in create XO account from ssh:
I completely missed that in the troubleshooting documentation but it is already there - nice
@olivierlambert said in create XO account from ssh:
As @gskger siad, this was already documented and visible by searching the term "recover" in the search bar
Uh - I tried a lot of other search terms, just not recover. Anyway - I'm back on track, thank you very much for all your help.