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

How to reset admin password #1197

Open
mizjaggy18 opened this issue Mar 2, 2021 · 8 comments
Open

How to reset admin password #1197

mizjaggy18 opened this issue Mar 2, 2021 · 8 comments

Comments

@mizjaggy18
Copy link

Hi, I am trying to take over an existing Cytomine (on Ubuntu 14.04 server), which was previously handled by a missing-in-action researcher. It is no longer hosted, thus only accessible from the server machine. The Project Leader needs to get access to all annotations stored in the server, especially the extracted ROIs. Is there any way to reset the Admin password? I hope @geektortoise could help. I tried some steps here (docker logs core) but couldn't find any password for Admin. The Admin username is "admincyto". Thank you.

@geektortoise
Copy link
Member

Hello,

Have you tried these ways ?

  1. In the configs/core/cytomineconfig.groovy file, you will find the default generated password for "admin" user.
    If nobody has changed this password, you will be able to connect to the admin account and change the password of the admincyto to reset it and to fetch any data.

  2. If the server can send mails, you can click on "Forgot your Username or your Password?" on the login page that will sent a link on the associate email of the admincyto account to reset the password.

  3. If all the previous ways fail, you can try to hard reset a password by setting the hash of a known password into the database.

As example : password 38d9fe22-80d1-49ca-a92e-c933f74aa96e
has the hash e3c3b6f675c1530206c63e632e0b080940a3fff2d060223758ca4bcb5a018153

so if you set the hash into the password field of the entry in the sec_user table that has the admincyto username, actually, you set the password to 38d9fe22-80d1-49ca-a92e-c933f74aa96e.

SQL is
UPDATE sec_user SET password = 'e3c3b6f675c1530206c63e632e0b080940a3fff2d060223758ca4bcb5a018153' WHERE username = 'admincyto';

Have a nice day

@mizjaggy18
Copy link
Author

Thank you @geektortoise. Can you guide on how to enter SQL from the terminal? It should already be installed together with Cytomine, right? Also I need to mention that the server PC has no internet connection, thus installing new software is not possible. Looking forward for your kind assistance, thank you.

@geektortoise
Copy link
Member

If you collegua has left the default value, here are the commands

sudo docker exec -it postgresql bash

psql -h localhost -U docker

Password for user docker: is docker

@mizjaggy18
Copy link
Author

If you collegua has left the default value, here are the commands

sudo docker exec -it postgresql bash

psql -h localhost -U docker

Password for user docker: is docker

The first line already gave me an error, as following:

Error response from daemon: No such container: postgresql

This Cytomine was installed around 2016-2017, thus the version could be v1 or v2. Could the error be because of the version?

@geektortoise
Copy link
Member

What is the result of the command
sudo docker ps
?

@mizjaggy18
Copy link
Author

Hi @geektortoise, sorry for the late reply, I was not in the lab previous days.

I attached here the output of sudo docker ps. Please advise. Thank you.

oput1
oput2

@mizjaggy18
Copy link
Author

Ok I just run this command:

sudo docker exec -it db bash

and got this response:

Error response from daemon: Container [CONTAINER ID] is restarting, wait until the container is running

where [CONTAINER ID] is the long alphanumeric ID for db.

I have waited around 10 minutes and it is still restarting. Could this be due to no internet connection?

@geektortoise
Copy link
Member

Hello,

Hmmm :/

What is the result of the command
sudo docker logs db
?
It may indicates why it is restarting.

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

2 participants