This is a bash script that decrypts stored passwords from DBeaver configuration files and displays them along with their matching datasource names. DBeaver encrypts credentials for security, and this tool helps you retrieve them when needed.
The script automatically searches for DBeaver configuration files in your home directory, decrypts the credentials, and presents the connection information in a readable table format showing the connection name, folder, username, and password.
Before running this script, ensure you have the following installed on your system:
- Bash: A Unix shell (standard on Linux/macOS).
- jq: A lightweight command-line JSON processor.
- openssl: A cryptography toolkit (usually pre-installed).
Simply run the script without any arguments, and it will automatically search for DBeaver configuration files:
./dbeaver-password-decrypter.shIf you know the location of your DBeaver configuration folder, you can provide it as an argument to skip the search:
./dbeaver-password-decrypter.sh /path/to/dbeaver/config/folderIf the script auto-detects the configuration folder, you'll first see:
Searching for a valid DBeaver configuration files folder...
Found configuration folder '/home/user/.local/share/DBeaverData/workspace6/General/.dbeaver'.
Use it as the first argument to avoid this search in the future.
The configuration folder should contain:
credentials-config.json: the encrypted credentials file.data-sources.json: the data sources configuration file.
- The script uses DBeaver's default encryption key to decrypt credentials.
- It requires read access to DBeaver's configuration files (typically located in
~/.local/share/DBeaverData/workspace6/General/.dbeaver/). - If the configuration folder is found automatically, the script will display its location for future reference.
When you run the script, you'll see output similar to this:
Configuration folder: /home/user/.local/share/DBeaverData/workspace6/General/.dbeaver
Folder Connection Name User Name Password
--- --- --- ---
Production PostgreSQL - Production admin Sup3rS3cr3t!
Development MySQL - Development developer dev_pass_123
Testing Oracle - Testing testuser test@2024
Staging MariaDB - Staging dbuser stage_pwd
For questions, bug reports, or feature requests, please use the GitHub Issues page.
Contributions are welcome via pull requests!