Admin Account Recovery

Admins may find themselves locked out of their accounts by forgetting or mis-setting their account passwords. This guide will show show the steps for resetting the admin account password.

  1. SSH to the Kasm Workspaces server and connect to the database with the following command:

    sudo docker exec -it kasm_db psql -U kasmapp -d kasm
    
  2. Reset the Admin password, clear WebAuthn credentials, clear TOTP credentials and exit the psql shell

    update users set
        pw_hash = 'fe519184b60a4ef9b93664a831502578499554338fd4500926996ca78fc7f522',
        salt = '83d0947a-bf55-4bec-893b-63aed487a05e',
        secret=NULL, set_two_factor=False, locked=False,
        disabled=False, failed_pw_attempts = 0 where username ='admin@kasm.local';
    DELETE FROM webauthn_credentials WHERE user_id IN ( SELECT user_id FROM users WHERE username = 'admin@kasm.local' );
    \q
    
  3. Login to the Workspaces UI using “admin@kasm.local” with the password “password” and reset your password to a secure password.

../_images/password_change.webp

Reset Password Location