Movatterモバイル変換


[0]ホーム

URL:


A ZX2C4 Project

pass

the standard unix password manager

Download

Introducingpass

Password management should be simple and followUnix philosophy. Withpass, each password lives inside of agpg encrypted file whose filename is the title of the website or resource that requires the password. These encrypted files may be organized into meaningful folder hierarchies, copied from computer to computer, and, in general, manipulated using standard command line file management utilities.

pass makes managing these individual password files extremely easy. All passwords live in~/.password-store, andpass provides some nice commands for adding, editing, generating, and retrieving passwords. It is a very short and simple shell script. It's capable of temporarily putting passwords on your clipboard and tracking password changes usinggit.

You can edit the password store using ordinary unix shell commands alongside thepass command. There are no funky file formats or new paradigms to learn. There isbashcompletion so that you can simply hit tab to fill in names and commands, as well as completion forzsh andfish available in thecompletion folder. Thevery active community has produced many impressiveclients and GUIs for other platforms as well asextensions forpass itself.

Thepass command is extensively documented in itsman page.

Tweet

Using the password store

We can list all the existing passwords in the store:

zx2c4@laptop ~ $ passPassword Store├── Business│   ├── some-silly-business-site.com│   └── another-business-site.net├── Email│   ├── donenfeld.com│   └── zx2c4.com└── France    ├── bank    ├── freebox    └── mobilephone

And we can show passwords too:

zx2c4@laptop ~ $ pass Email/zx2c4.comsup3rh4x3rizmynam3

Or copy them to the clipboard:

zx2c4@laptop ~ $ pass -c Email/zx2c4.comCopied Email/jason@zx2c4.com to clipboard. Will clear in 45 seconds.

There will be a nice password input dialog using the standardgpg-agent (which can be configured to stay authenticated for several minutes), since all passwords are encrypted.

We can add existing passwords to the store withinsert:

zx2c4@laptop ~ $ pass insert Business/cheese-whiz-factoryEnter password for Business/cheese-whiz-factory: omg so much cheese what am i gonna do

This also handles multiline passwords or other data with--multiline or-m, and passwords can be edited in your default text editor usingpass edit pass-name.

The utility cangenerate new passwords using/dev/urandom internally:

zx2c4@laptop ~ $ pass generate Email/jasondonenfeld.com 15The generated password to Email/jasondonenfeld.com is:$(-QF&Q=IN2nFBx

It's possible to generate passwords with no symbols using--no-symbols or-n, and we can copy it to the clipboard instead of displaying it at the console using--clip or-c.

And of course, passwords can be removed:

zx2c4@laptop ~ $ pass rm Business/cheese-whiz-factoryrm: remove regular file ‘/home/zx2c4/.password-store/Business/cheese-whiz-factory.gpg’? yremoved ‘/home/zx2c4/.password-store/Business/cheese-whiz-factory.gpg’

If the password store is a git repository, since each manipulation creates a git commit, you can synchronize the password store usingpass git push andpass git pull, which callgit-push orgit-pull on the store.

You can read more examples and more features in theman page.

Setting it up

To begin, there is a single command to initialize the password store:

zx2c4@laptop ~ $ pass init "ZX2C4 Password Storage Key"mkdir: created directory ‘/home/zx2c4/.password-store’Password store initialized for ZX2C4 Password Storage Key.

Here,ZX2C4 Password Storage Key is the ID of my GPG key. You can use your standard GPG key or use an alternative one especially for the password store as shown above. Multiple GPG keys can be specified, for using pass in a team setting, and different folders can have different GPG keys, by using-p.

We can additionally initialize the password store as a git repository:

zx2c4@laptop ~ $ pass git initInitialized empty Git repository in /home/zx2c4/.password-store/.git/zx2c4@laptop ~ $ pass git remote add origin kexec.com:pass-store

If a git repository is initialized,pass creates a git commit each time the password store is manipulated.

There is a moredetailed initialization example in theman page.

Download

The latest version is 1.7.4.

Ubuntu / Debian

$ sudo apt-get install pass

Fedora / RHEL

$ sudo yum install pass

openSUSE

$ sudo zypper in password-store

Gentoo

# emerge -av pass

Arch

$ pacman -S pass

Macintosh

The password store is available through theHomebrew package manager:

$ brew install pass

FreeBSD

# pkg install password-store

Tarball

The tarball contains a generic makefile, for which a simplesudo make install should do the trick.

Git Repository

You maybrowse the git repository or clone the repo:

$ git clone https://git.zx2c4.com/password-store

All releases are tagged, and the tags are signed with0xA5DE03AE.

Data Organization

Usernames, Passwords, PINs, Websites, Metadata, et cetera

The password store does not impose any particular schema or type of organization of your data, as it is simply a flat text file, which can contain arbitrary data. Though the most common case is storing a single password per entry, some power users find they would like to store more than just their password inside the password store, and additionally store answers to secret questions, website URLs, and other sensitive information or metadata. Since the password store does not impose a scheme of it's own, you can choose your own organization. There are many possibilities.

One approach is to use the multi-line functionality of pass (--multiline or-m ininsert), and store the password itself on the first line of the file, and the additional information on subsequent lines. For example,Amazon/bookreader might look like this:

Yw|ZSNH!}z"6{ym9pIURL: *.amazon.com/*Username: AmazonianChicken@example.comSecret Question 1: What is your childhood best friend's most bizarre superhero fantasy? Oh god, Amazon, it's too awful to say...Phone Support PIN #: 84719

This is the preferred organzational scheme used by the author. The--clip /-c options will only copy the first line of such a file to the clipboard, thereby making it easy to fetch the password for login forms, while retaining additional information in the same file.

Another approach is to use folders, and store each piece of data inside a file in that folder. For exampleAmazon/bookreader/password would hold bookreader's password inside theAmazon/bookreader directory, andAmazon/bookreader/secretquestion1 would hold a secret question, andAmazon/bookreader/sensitivecode would hold something else related to bookreader's account. And yet another approach might be to store the password inAmazon/bookreader and the additional data inAmazon/bookreader.meta. And even another approach might be use multiline, as outlined above, but put the URL template in the filename instead of inside the file.

The point is, the possibilities here are extremely numerous, and there are many other organizational schemes not mentioned above; you have the freedom of choosing the one that fits your workflow best.

Extensions forpass

In order to faciliate the large variety of uses users come up with,pass supports extensions. Extensions installed to/usr/lib/password-store/extensions (or some distro-specific variety of such) are always enabled. Extensions installed to~/.password-store/.extensions/COMMAND.bash are enabled if thePASSWORD_STORE_ENABLE_EXTENSIONS environment variable istrue Read theman page for more details.

The community has produced many such extensions:

Compatible Clients

The community has assembled an impressive list of clients and GUIs for various platforms:

Migrating topass

To free password data from the clutches of other (bloated) password managers, various users have come up with different password store organizations that work best for them. Some users have contributed scripts to help import passwords from other programs:

Credit & License

pass was written byJason A. Donenfeld ofzx2c4.com and is licensed under theGPLv2+.

Contributing

This is a very active project with ahealthy dose of contributors. The best way to contribute to the password store is tojoin the mailing list and send git formatted patches. You may also join the discussion in#pass on Libera.Chat.

Tweet


[8]ページ先頭

©2009-2026 Movatter.jp