Encrypt your passwords into a file and have easy access.
A local password manager which simply encrypts your passwords in to a file and managing passwords made easy .
-
Using the command line, add the following to your /etc/apt/sources.list system config file,
sudo echo "deb https://dl.bintray.com/maanafunedu/maanadev-debian stable main" | sudo tee -a /etc/apt/sources.list
-
Configure Bintray public GPG key,
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
-
Update repository,
sudo apt update
-
Install password-manager,
sudo install password-manager
-
Tap into password-manager brew formula with the following command,
brew tap ThilinaManamgoda/homebrew-password-manager
-
Install password-manager, with the following command,
brew install password-manager
-
Initialize the password manager with the following command,
password-manager init
Enter the Master password once prompted.
-
Add a password entry with the following command,
password-manager add TEST -i
Here password entry id is TEST which always should be a unique value. By passing -i parameter we are enabling the Interactive mode. Once this command is executed, the following entries will be listed,
Username: <Enter the username for this password entry> Password: <Enter the password for this password entry> Enter the Password again: <Enter the password again for this password entry> Description: <Enter the password description> Lables: <Enter lables that can be used for searching. This can be list of comma seperated values> Master password: <Enter Master password> Example: Username: [email protected] Password: *********** Enter the Password again: *********** Description: Test descritption Lables: test,first,firstTime Master password: <Enter Master password>
-
Get a password entry with ID
password-manager get <ID>
Enter the Master password once prompted. For an example,
password-manager get TEST
-
Search a password entry with a ID
password-manager search <ID>
Enter the Master password once prompted. For an example,
password-manager search test
Once you enter the Master password, a list of password entries will be listed that match the given label. Once the entry is selected, the password will be copied to the clipboard.
-
Search a password entry with a label
password-manager search -l <LABEL>
Enter the Master password once prompted. For an example,
password-manager search -l test
Once you enter the Master password, a list of password entries will be listed that match the given label. Once the entry is selected, the password will be copied to the clipboard.
-
Follow the instructions to override default configurations using a configuration file.
-
Create a password-manager.yaml file with following content. Keep configurations that need to be overridden.
# Set encryptor for encryping passwords. Ex: "AES" encryptorID: "AES" # Maximum list size for selection drop down. selectListSize: 5 # Directory which holds the Password manager related files. directoryPath: "~/password-manager" # Set storage configurations. storage: # File storage configuration. file: # Enable File storage. enable: true # Password Database file name. passwordDBFile: "password_db" # File permission for given file in the path. permission: 0640 # Google Drive storage configuration. googleDrive: # Enable Google Drive storage. enable: false # Directory where the password Database file resides. directory: "password-manager" # Password Database file name. passwordDBFile: "password_db"
-
Export Environment variable to point the configuration file.
export PM_CONF_PATH=${PATH_TO_PASSOWRD_MANAGER_YAML}
-
-
Follow the instructions to override default configurations using environment variables.
- Export required override configuration as environment variable. For example let's assume that you need
to override file permission of the File storage type.
export PM_STORAGE_FILE_PERMISSION=0640
Environment variable should have the prefix
PM_
and the hierarchy separation with_
and keyword ALL CAPS.examples:
`PM_SELECTLISTSIZE=2` `PM_ENCRYPTORID=AES` `PM_STORAGE_FILE_PASSOWRDDBFILE=password_db`
- Export required override configuration as environment variable. For example let's assume that you need
to override file permission of the File storage type.
If you need to transfer your passwords to a different PC where you have installed password-manager, it can be achieved by making a copy of your password database file assuming storage type is File. This is not required if the storage type is Google Drive.
-
Export passwords to CVS file with the following command,
pasword-manager export --csv-file ${PATH_TO_CSV_FILE}
Exported CSV file will have the following format(Ex: test/mock-data/data.csv),
id,username,password,description,labels [email protected],[email protected],gijggx3MDxZ,"Desciption of the password","foo,com"
-
Export passwords to HTML file with the following command,
pasword-manager export --html-file ${PATH_TO_HTML_FILE}
You can import passwords from a CSV file with following command,
pasword-manager import --csv-file ${PATH_TO_CSV_FILE}
CSV file should be in the following format(Ex: test/mock-data/data.csv),
id,username,password,description,labels
[email protected],[email protected],gijggx3MDxZ,"Desciption of the password","foo,com"
If all the Storage types are enabled, the priority will be given as follow,
- Google drive storage
- Local file storage
When upgrading password-manager cli, please make sure that whether it is required to upgrade the password database as well. It will be mentioned in the release note. If it is mentioned in the release note that the password-database must be upgraded, then after installing run the following command,
password-manager upgrade-db
This command upgrades the password database to latest version and creates a backup of the current password database.
Please find more details on upgrade-db
command here.
- password-manager init - Initialize the Password Manager
- password-manager add - Add a new password
- password-manager change - Change a password entry
- password-manager change-master-password - Change Master password
- password-manager generate-password - Generate a secure password
- password-manager get - Get a password
- password-manager search - Search Password with ID
- password-manager import - Import passwords
- password-manager export - Export password repository to a file
- password-manager remove - Remove a password
- password-manager upgrade-db - Upgrade password database to latest version