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

Postgres Password #33

Closed frauseo closed 7 months ago

frauseo commented 7 months ago

Hi, first of all, nice that you take your time to mantain this project! :trophy:

If i'm not mistaken, when you want to connect to te postgresql db, you do not have to provide a password, is this correkt? For example, here you provide a update command but no pw is given.

docker exec -it guacamole bash -c "psql -U guacamole guacamole_db -c \"UPDATE guacamole_user_attribute SET attribute_value='false' WHERE attribute_name = 'guac-totp-key-confirmed' and user_id = (SELECT user_id FROM guacamole_user INNER JOIN guacamole_entity ON guacamole_entity.entity_id = guacamole_user.entity_id WHERE guacamole_entity.name = 'your username');\""

If so, feel free to assign me this taks ;-)

Cheers

abesnier commented 7 months ago

Hi.

Thanks for the kind word. It's not a lot work, but still, I try to maintain it a least once a week.

The password can be set up in guacamole.properties. The default is null, that's why none of the scripts include a password.

I must admit that I have not tried, but I guess if one would like to add a password to the database, the process would be to create the guacamole.properties first, edit the line postgresql-password, then start the container from scratch.

If you need to use an existing database, then you will need to enter the container (docker exec -it guacamole bash), open psql (psql -U guacamole guacamole_db), then change the password with \password guacamole and put the same password in guacamole.properties.

As the default behaviour is to not have a password set, I will not update, but will answer if a user asks for it ;-)

Cheers, Antoine

frauseo commented 7 months ago

Hi Antoine, I understand your point. There is also no variable that could be passed from the docker run or docker-compose command, since the Dockerfile takes care of the install of the db and it's schema.

Thanks for clarify! Cheers