abesnier / docker-guacamole

A self-contained guacamole docker container for x64. Remotely connect over SSH, RDP or VNC using HTML5.
https://hub.docker.com/r/abesnier/guacamole
GNU General Public License v3.0
78 stars 14 forks source link

Reset password via ssh #35

Closed lavazza2017 closed 1 month ago

lavazza2017 commented 4 months ago

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 commented 4 months ago

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 commented 3 months ago

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 commented 3 months ago

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](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 commented 3 months ago

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