Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jesussuarz/07f684e25b9d28b110c43b36b5e8fc5b to your computer and use it in GitHub Desktop.
Save jesussuarz/07f684e25b9d28b110c43b36b5e8fc5b to your computer and use it in GitHub Desktop.
Change User Role to Administrator in Passbolt from the Database using phpMyAdmin

Change User Role to Administrator in Passbolt from the Database using phpMyAdmin

If you have a user in Passbolt and have access to the database, you can make that user an administrator by following these steps:

Step 1: Access phpMyAdmin on your server

First, log in to phpMyAdmin on your server.

Step 2: Access the Role Table

Once inside phpMyAdmin, look for the "roles" table or run the following SQL query to see the list of roles and their IDs:

SELECT * FROM `roles`;

Step 3: Access the User Table

Next, look up the users table or run the following SQL query:

SELECT * FROM `users`;

Step 4: Find and Modify the User Role

Find the user you want to make an administrator and modify the role_id field with the ID corresponding to the administrator role. You can do this manually or run the following SQL query, replacing YOUR_ID_ADMIN_ROLE with the administrator role ID and YOUR_ID_USER with the user ID:

UPDATE `users` SET `role_id` = 'YOUR_ID_ADMIN_ROLE' WHERE `users`.`id` = 'YOUR_ID_USER';

Step 5: Disconnect and Reconnect

Finally, log out of your account and log in again. You should now see your account with the administrator role in Passbolt.

Ready! You have successfully changed the role from user to administrator from the database using phpMyAdmin in Passbolt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment