Resettare la password di un utente Guacamole

From RVM Wiki
Jump to navigation Jump to search
Attenzione questo articolo è ancora incompleto.
Sentiti libero di contribuire cliccando sul tasto edit.
  • VERIFICARE TUTTO
  • Lanciare Mysql nel container docker del DB:
docker compose exec guacamole-db  bash -c 'mysql -u$MYSQL_USER -p$MYSQL_PASSWORD'
SET @username= 'myuser';

SELECT user_id FROM guacamole_user INNER JOIN guacamole_entity ON guacamole_entity.entity_id = guacamole_user.entity_id WHERE guacamole_entity.name = '@username';

-- Update user and hash password with salt
SET @salt = UNHEX(SHA2(UUID(), 256));
USE guacamole_db;
UPDATE guacamole_user
SET
    password_salt = @salt,
    password_hash = UNHEX(SHA2(CONCAT('mypassword', HEX(@salt)), 256))
WHERE
    username = @username;

Riferimenti