Linux use pass to manage passwords

  

In the Linux system operation, the use of more passwords can not be remembered, but also easy to remember, if you use password management tools to manage it will be a lot easier, the following small series will give Everyone introduces a practical password management tool pass, together to learn the use of the pass.

For those who do not want to rely on graphical user password management, it will pass on how to use the command line to manage the password, which is a command-line tool to manage passwords for simple .

The password tool is actually a front-end for shell scripting, in which several other tools (such as gpg, pwgen, git, xsel) are called to manage user password information using OpenGPG. Each password is encrypted using the gpg tool and stored in a local password repository. Password information can be used through the terminal or a self-cleaning clipboard tool.

The password tool is quite flexible and easy to use. You can store each password information in an OpenGPG protected plain text file and group different password files into multiple categories. It supports the bash auto-completion feature, so it's easy to use the TAB key to complete commands or long password names.

Installing pass

on Linux Install pass on Debian, Ubuntu or Linux Mint:

$ sudo apt-get install pass

$ echo &ldquo ;source /etc/bash_completion.d/password-store”》》~/.bashrc

Install pass on Fedora:

$ sudo yum install pass

$ echo <quo;source /etc/bash_completion.d/password-store”》》~/.bashrc

To install pass on CentOS, first enable the EPEL repository, then execute the following command:

$ sudo Yum install pass

$ echo “source /etc/bash_completion.d/password-store”》》~/.bashrc

Install pass on Archlinux:

$ Sudo pac -S pass

$ echo “source /etc/bash_completion.d/password-store”》》~/.bashrc

Initializing the local password repository

Before using the password tool, you need to perform an initialization step that includes creating a GPG key pair (if you don't already have one) and a local Code repository.

First, create a GPG key pair (ie: public/private key) by following the steps below. If you have already created your own GPG key pair, you can skip this step.

$ gpg --gen-key

Performing this step will ask you the following questions. If you are not sure, you can choose to accept the default answer. As part of the key generation, you will create an encrypted password for your key, which is actually the master password when you access any password information stored in the local password store. After the key pair is successfully created, the created key pair is stored in the ~/.gnupg directory.

Next, run the following command to initialize the local password storage. Below, enter the associated email address when the key pair was created.

$ pass init gpg-id

This command creates a password store in the ~/.password-store directory.
Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved