Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LXD not installed and can not change password #316

Closed
NicolasGoeddel opened this issue Jul 29, 2020 · 6 comments
Closed

LXD not installed and can not change password #316

NicolasGoeddel opened this issue Jul 29, 2020 · 6 comments

Comments

@NicolasGoeddel
Copy link

Hi,

the installation procedure did not mention if I have to install lxdui as root or as normal user. But I saw in the automated installation script that you are installing it with the --useroption on pip install. So I decided to create a new user and installed it there.
After cloning and pip install . --user I started it with python3 run.py start. I was able to connect to the webinterface but I didn't know the password, but I finally guessed admin:admin right. It seemed that I am not able to change the password.

So I went one step back and found out that I had to run python3 run.py init first which was not mentioned in the installation guide. As I run that I was asked for my password which I entered twice and that's it. Starting the webinterface again the new password was wrong. Instead I had to use admin again. So how can I change that password? I can not run it on a public IP like that and also not over http, I need to proxy it behind Apache.

At the moment all i can see is this:
image
How can I tell it where my LXD installation is? It's a snap installation on Ubuntu 18.04 with lots of productive containers already running. Was I wrong with installing it as a normal user? Do I have to install it as root?

@NicolasGoeddel
Copy link
Author

I just found the first answer by myself:
I had to add the user lxdui to the group lxd. Let's make this a feature request for the documentation.

But one question still exists: How to change the password for the admin account?

@NicolasGoeddel
Copy link
Author

I just changed the bind address of in app/api/controllers/terminal.py to 127.0.0.1 and reinstalled the package again with pip install . --user. Now it does not work no more.

lxdui@server:~/lxdui$ lxdui init
Password: 
Repeat for confirmation: 
Initialize and configure LXDUI
LXDUI is now configured.  You can now use the admin account to log in to the app.
lxdui@server:~/lxdui$ lxdui user list
User Accounts:
Please initialize LXDUI first.  e.g: lxdui init 
lxdui@server:~$ lxdui user update
Password: 
Repeat for confirmation: 
Change user password
Please initialize LXDUI first.  e.g: lxdui init
lxdui@server:~$ lxdui start
LXDUI ver. 2.1.2 -- (c)AdaptiveScale, Inc.
http://www.adaptivescale.com
LXDUI started. Running on http://0.0.0.0:15151
PID=23060, Press CTRL+C to quit
Please initialize LXDUI first.  e.g: lxdui init 
Please initialize LXDUI first.  e.g: lxdui init 
Please initialize LXDUI first.  e.g: lxdui init 
Please initialize LXDUI first.  e.g: lxdui init 
Please initialize LXDUI first.  e.g: lxdui init 
Please initialize LXDUI first.  e.g: lxdui init 
Please initialize LXDUI first.  e.g: lxdui init 
Please initialize LXDUI first.  e.g: lxdui init 
Please initialize LXDUI first.  e.g: lxdui init 
Please initialize LXDUI first.  e.g: lxdui init 
Please initialize LXDUI first.  e.g: lxdui init

What can I do about this? Everytime I try to login using the webinterface I see this line and the new and the old password seem to be wrong. How often do I have to initialize lxdui? Where is its configuration so I can modify and validate it by myself?

@NicolasGoeddel
Copy link
Author

NicolasGoeddel commented Jul 29, 2020

Again my fault. I accidentally renamed auth.conf to auth.conf.old while trying to force a new password for the admin account. Now I can login again but I am still not able to change the password. I tried this:

lxdui@server:~$ lxdui user update
Password: 
Repeat for confirmation: 
Change user password

But after a lxdui start it's again the same password. I do not understand.

@NicolasGoeddel NicolasGoeddel changed the title LXD not installed LXD not installed and can not change password Jul 29, 2020
@NicolasGoeddel
Copy link
Author

It looks like the interface is just not that verbose and does not tell if something was wrong. The correct call is:

lxdui user update -u admin

Now the password got changed correctly.

@vhajdari
Copy link
Contributor

vhajdari commented Jul 29, 2020 via email

@chrispe-lab
Copy link

I found the issue, you need to use the non-CLI command: "python3 run.py user update -u admin" to change pw for admin. This also works persitently across reboots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants