Comments (10)
You can include the password on the initial user creation (POST /users
), but unfortunately I agree that PUT users/user_id
doesn't allow you update the password. I think your original idea of using ResetPassword()
would work, but it is obviously less convenient than an API since you have to be in the Lemur container to run it (and it's interactive, not a single call).
Feel free to propose a PR against Lemur if you'd like, though I must admit that I'm not sure if there's an intentional reason this functionality isn't included.
from lemur-docker.
Hi @Jonesy22 - I haven't had time to spin up a Docker container today to test this out (nor have I confirmed the required parameters to run it), but I'd expect you could run it using a command similar to the following (using docker exec
):
# use correct username/password/DB name; these are the default values
export SQLALCHEMY_DATABASE_URI="postgresql://lemur:12345@postgres:5432/lemur"
/opt/venv/bin/python3 /opt/lemur/lemur/manage.py --config=/home/lemur/.lemur/lemur.conf.py reset_password -u username
I took this from the Docker entrypoint, which uses the same syntax to invoke Lemur's init
command.
Let me know how this works for you.
from lemur-docker.
Also, in case you're not familiar with docker exec, you'd start with something like:
docker exec -it lemur-docker_lemur_1 bash
Which should get you into a shell on the Docker container in order to execute the command I mentioned above.
from lemur-docker.
Thank you for your response. So I've exec'd into the container successfully, but when I try running the line in your first comment, it says /opt/venv/bin/python3: not found. I do not have /opt/venv/ in the lemur container, as opt/ only holds lemur/
from lemur-docker.
How did you start the container? It's been a while since I worked on this project but I'm pretty sure /opt/venv
is a necessary directory; I wouldn't expect the container to be able to start successfully without it.
from lemur-docker.
In one terminal I did docker-compose up
. And then in a separate terminal I did the exec command, and then tried to run that reset password commad.
from lemur-docker.
When you run docker ps
, does your lemur-docker_lemur_1
container indicate healthy
? Are you able to access the UI at https://localhost:447/? I'm a bit baffled how you could be missing /opt/venv
; it's used in the Dockerfile as well as in the entrypoint
(unless loading from a dump file). If your container really doesn't have /opt/venv
, I think that indicates something more fundamentally wrong with the container.
from lemur-docker.
So after running a make clean
and then make
. It is rebuilt and I now can access /opt/venv
. I executed the activate
command in /opt/venv/bin
by running source activate
from that directory. Then when I tried to run lemur reset_password -u lemur
, I got an error saying no such tables: users
.
from lemur-docker.
Sounds like you haven't initialized the Lemur DB yet. See the Database configuration
section under the Configuration header in the README -- you probably want to run your containers in init
mode once (but make sure you switch it back to blank after so the data isn't overwritten on the next boot).
from lemur-docker.
Thank you for all your help. Ideally for my use, users would have accounts created for them by an admin, and then they can change their passwords on their own accounts. But this process doesn't seem to help me in that case. Essentially I want to have functionality in the PUT users/user_id
API call to change the user's password, so it can be changed by 1 call. But it looks like this isn't implemented within Lemur unfortunately.
from lemur-docker.
Related Issues (20)
- lemur_web-1 docker keeps restarting with database "errors" HOT 7
- unable to locate credentials HOT 2
- Package has no installation candidate HOT 1
- Database error - Doesn't create user table HOT 1
- docker-compose up fails HOT 4
- docker-compose up fails HOT 4
- Can you please assist me
- Lemur Pod in K8s crashing HOT 1
- Why install Postgresql package in Web? HOT 2
- Add a docker-compose file with celery HOT 1
- 403 Forbidden HOT 4
- services.lemur.depends_on contains an invalid type, it should be an array
- bower ESOCKETTIMEDOUT during make or docker-compose HOT 6
- Root CAs and Certs missing in UI from all but dashboard after containers restarted HOT 3
- netlix-lemur:latest (unhealthy) HOT 3
- Certificates not shown in UI after reboot HOT 1
- Build process is failing
- Build fails on ReferenceError: TextDecoder is not defined
- Can't able to genrate server and client certs for the old Root certificate authority certs. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lemur-docker.