Welcome to the Python Password Manager — your personal vault for securely managing passwords, powered by the robust combination of Python and MariaDB. Whether you're tired of forgetting passwords or juggling dozens of them, this tool simplifies your digital life with cutting-edge security built right in.
At its core, the password manager leverages PBKDF2 (Password-Based Key Derivation Function 2) to transform your MASTER PASSWORD and a DEVICE SECRET (a unique code tied to your device) into a powerful 256-bit encryption key. This key acts as the ultimate lock-and-key system, ensuring that your passwords are safely encrypted using AES-256, one of the most trusted encryption standards today.
With this password manager, your sensitive information is locked away in a local database that only you can access — no cloud storage, no third-party access — just you and your securely encrypted data.
Plus, with a command-line interface that’s easy to use and lightning-fast, managing your passwords is not only secure but also fun and efficient. Take control of your digital security while exploring the exciting world of encryption and databases!
- Strong AES-256 encryption for password security.
- User-friendly command-line interface for adding, retrieving, and generating passwords.
- Secure storage of credentials in a local MariaDB database.
- Copy passwords directly to the clipboard using Pyperclip.
- Python 3.x
- MariaDB
- Pyperclip (for clipboard functionality)
-
Install Python Requirements:
sudo apt install python3-pip pip install -r requirements.txt
-
Install MariaDB:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntuprecise main' sudo apt-get update sudo apt-get install mariadb-server
-
Create MariaDB User:
- Login as root:
sudo mysql -u root
- Create a user:
CREATE USER 'pm'@localhost IDENTIFIED BY 'password';
- Grant necessary privileges:
GRANT ALL PRIVILEGES ON *.* TO 'pm'@localhost IDENTIFIED BY 'password';
- Login as root:
-
Pyperclip Fix (if needed): If you encounter a "not implemented error", follow this guide.
-
Install Python Requirements:
pip install -r requirements.txt
-
Install MariaDB: Follow this guide for installation on Windows.
-
Create MariaDB User:
- Navigate to the MariaDB bin directory:
C:\Program Files\MariaDB\bin
- Login as root:
mysql.exe -u root -p
- Create a user:
CREATE USER 'pm'@localhost IDENTIFIED BY 'password';
- Grant privileges:
GRANT ALL PRIVILEGES ON *.* TO 'pm'@localhost IDENTIFIED BY 'password';
- Navigate to the MariaDB bin directory:
Before using the password manager, you need to configure it by setting up a MASTER PASSWORD.
-
Create Configuration: Run the following command to set up the MASTER PASSWORD and generate the DEVICE SECRET. This also creates the necessary database and tables.
python config.py make
-
Delete Configuration: Warning: This will permanently delete all saved passwords.
python config.py delete
-
Remake Configuration: This will delete the existing setup and create a new configuration.
python config.py remake
After configuration, you can use the password manager to add, retrieve, or generate passwords. Below are the common commands:
python pm.py -h
This displays all available options for adding, retrieving, and generating passwords.
To add a new entry for a site:
python pm.py add -s mysite -u mysite.com -e hello@email.com -l myusername
- Retrieve all entries:
python pm.py extract
- Retrieve entries by site name:
python pm.py e -s mysite
- Retrieve a specific entry by site name and username:
python pm.py e -s mysite -l myusername
- Copy the password of a specific entry to the clipboard:
python pm.py e -s mysite -l myusername --copy
To generate a random password and copy it to the clipboard:
python pm.py g --length 15
This project is licensed under the MIT License.
Contributions are welcome! Please open an issue or submit a pull request if you'd like to improve the code or documentation.