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

Reset password via ssh #35

Open
lavazza2017 opened this issue May 8, 2024 · 4 comments
Open

Reset password via ssh #35

lavazza2017 opened this issue May 8, 2024 · 4 comments

Comments

@lavazza2017
Copy link

Hi,
after some time I forget or someone change my password to my account.
How to look password or change it via ssh ?
(Unfortunate I delete backup admin account :()
any hint ?

@abesnier
Copy link
Owner

abesnier commented May 8, 2024

Yes, it is possible.

There are two scenarios: either you don't care about the other settings (users, connections, history, etc) and in that case, you can just delete your config directory. Restarting the container will re-seed the database with default admin user, but you lose everything else.

Or you care about those things, and you need to recreate the entry for the admin user directly in the database. I'll need to check the guacamole documentation and I'll send you the pgsql commands tomorrow (it's night time in France where I am)

Cheers

@lavazza2017
Copy link
Author

Yes, it is possible.

There are two scenarios: either you don't care about the other settings (users, connections, history, etc) and in that case, you can just delete your config directory. Restarting the container will re-seed the database with default admin user, but you lose everything else.

Or you care about those things, and you need to recreate the entry for the admin user directly in the database. I'll need to check the guacamole documentation and I'll send you the pgsql commands tomorrow (it's night time in France where I am)

Cheers

hi, still waiting :)

@abesnier
Copy link
Owner

Indeed, sorry... I'm like Weiss and Benioff... I kinda forgot...

So, here's the fix:
1 - Download the schema file https://raw.githubusercontent.com/apache/guacamole-client/main/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema/002-create-admin-user.sql from the Apache Guacamole github and put it in your config directory.
2 - Enter the docker container (docker exec -it guacamole bash)
3 - Execute the SQL file psql -U guacamole guacamole_db -a -f 002-create-admin-user.sql
This should have recreated the default guacadmin user, with its default guacadmin password.

I tried it on my container, but let me know if this does not work.

@lavazza2017
Copy link
Author

Thank you, it is working as should. Now I have again all permissions :)

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