9 ms·
Simple Password Management with GPG
- zwayhowder 6y agoFrom the article: > I’m aware of pass and tried it before I came to this setup, but I want to put more info than just a password string in my files, so that’s why pass doesn’t fit my need. I keep a lot more than just the password string in my files. They are just plain text files after all. My largest secret was a full dump of my old Lastpass database as some imports failed due to naming issues. This looks like an interesting exercise but I think the pass ecosystem provides a more robust tool for day to day use; though neither option are useful for my non-technical family members (IMHO). (edited for clarity)
- mrmattyboy 6y agoYeh, I wonder if it's due to the fact that `pass generate` and `pass insert` commands, by default, create one-line files that gives this impression.
- karlding 6y agoWell, this exact use case is mentioned on the pass website [0]. > One approach is to use the multi-line functionality of pass (--multiline or -m in insert), and store the password itself on the first line of the file, and the additional information on subsequent lines. The Android Password Store app [1] also handles this format, interpreting the first line as the password and displaying the subsequent lines as additional information. [0] https://www.passwordstore.org/ https://www.passwordstore.org/ [1] https://github.com/android-password-store/Android-Password-Store https://github.com/android-password-store/Android-Password-S...
- cipherboy 6y agoI use my own wrapper over pass, https://github.com/cipherboy/p https://github.com/cipherboy/p, to use the remaining space as a JSON blob and pretty-print it with jq.
- nimitz12 6y agoBlog post author here, yes you are correct, I falsely assumed that I can only insert and manipulate one liners in the file due to these commands being the first things I learned about how to use pass, so I just moved away quickly without looking deeper.
- nickjj 6y agoYeah, after reading that sentence I kind of just stopped reading the article. Pass' multi-line flag lets you save whatever text you want. It's really handy because you can save a couple of things like API keys and what not but have the first line be your password so you can still use it seamlessly as a password manager with the copy to clipboard flag, but then access the extra lines of details on a need to know basis.
- throwaway201103 6y agoThe only thing that is required (if you want the clipboard integration to work correctly) is that the first line of the file is the password. You can have other info in the file. Many of mine have my "secret questions" and their random gibberish answers, for instance.
- sigio 6y agoPass will store arbitrary text, and various pass frontends (qtpass, and ansible's passwordstore lookup plugin) will also allow you to put in key-value fields, and query them.
- war1025 6y agoI use pass and store all sorts of stuff in there. For instance, I have five years of tax returns saved in it. It's a simple, secure way to store them for easy retrieval later. To store: $ cat tax_return.pdf | pass insert -m taxes/returns/2017 To view: EDITOR=/usr/bin/evince pass edit taxes/returns/2017
- tortasaur 6y agoWhile this works, at a certain point it starts to make more sense to use something like Nextcloud.
- war1025 6y agoLooked at the wikipedia page for that project briefly, seems like just a private file server type thing. That seems like a different use case from what I am after, which is safely and redundantly storing secrets in plain sight. I don't put random things in my password store, I put passwords and other sensitive or easy to misplace files that I will likely want to find later. I agree that you'd be better off storing most of your files on a file server. But that's a different thing, in my opinion.
- mdtusz 6y agoOr just use plain old gpg and a git repo or backup service. Pass is good because it is roughly domain specific to passwords and secrets. I wouldn't exactly consider tax forms "secrets", but rather just private information. Adding everything private and the kitchen sink seems like a misuse, but if it works, it works!
- Avamander 6y agoWhy not simply use BitWarden?
- dmtroyer 6y agobitwarden_rs is especially good if you're looking to self host. https://github.com/dani-garcia/bitwarden_rs https://github.com/dani-garcia/bitwarden_rs
- AnonHP 6y agoI saw something on the Bitwarden site about needing a paid license if you wanted to self host and use sharing features and got confused as to how “free” it is. Do you know more about this?
- anaganisk 6y agoIm really curious as to why you wont want to pay for a license for bit warden its very cheap and adds a lot of value. Any way you can self-host on free tier https://bitwarden.com/pricing/ https://bitwarden.com/pricing/
- AnonHP 6y agoMy point and question was not about me not wanting to pay. It was about what's meant by "free" and "open source" if you have to pay to use it on your own running costs if you want certain features (the sharing feature is one example I mentioned). If you read through the link you posted and also the FAQ, you'd see that you can only self host the free tier features for free. If you wish to have some premium features or a family sharing feature and want to self host, you still have to pay. My question was about what the OP was using/hosting and the licensing model.
- Macha 6y agoSo you can self host for free. Most of the older premium features are included in the open source server - it does have a license check, which loads a license file you're provide by Bitwarden if you purchase one. These older premium features and the license check are themselves AGPL licensed last time I looked. Alternatively, you can use bitwarden_rs, a re-implementation of the server under GPLv3. Many of the premium features (such as yubikey support) are implemented in bitwarden_rs out of the box so you don't need a license for those. Some of the newer premium features, such as SSO integration are under the Bitwarden license, which is more of a visible source license.
- tao_oat 6y agoI'm a pretty big fan of plain text for many things, but in this case it seems significantly simpler to just use a more full-featured password manager. I'm not sure I really see the benefit of a system like this. This setup (as well as pass) has one security downside over other password managers like 1Password, BitWarden, etc.: they leak information through the filenames you use to organize your passwords. Depending on who you are and your threat model, it could be pretty bad if someone gets a hold of your password store that contains an (encrypted) file called `silk road` or whatever.
- throwaway201103 6y agoThat's a valid critique for some use cases, I guess. Doesn't really apply to my uses, but there are some ways around this including having the presumably few very sensitive accounts saved using alias names that only you know.
- gnufx 6y agoIs pass-tomb not a decent solution to that? I've not considered it necessary in my threat model, so don't know.
- bobbylarrybobby 6y agoYou could use (say) UUIDs as the filenames and maintain an encrypted table containing the mapping between human readable filenames and UUIDs.
- mixcocam 6y agoI'm looking for a simple solution like this to easily keep encrypted .Md files as a journal. For passwords keepassxc does everything I need.
- m-p-3 6y agoThat the beauty of the KeePass format, if you don't like the UI, there's usually another app that can read it. There's a list of compatible apps * KeePass (Windows): https://keepass.info/ https://keepass.info/ * KeePassXC (Windows, Linux, MacOS): https://keepassxc.org/ https://keepassxc.org/ * KeeWeb (Windows, Linux, MacOS, Web): https://keeweb.info/ https://keeweb.info/ * AuthPass (Windows, Linux, MacOS, iOS, Android): https://authpass.app/ https://authpass.app/ * Keepass2Android (Android): https://play.google.com/store/apps/details?id=keepass2android.keepass2android https://play.google.com/store/apps/details?id=keepass2androi... * KeePassium (iOS): https://keepassium.com/ https://keepassium.com/
- m-p-3 6y agoGPG and simple aren't something I can say goes well together. I prefer to use the KeePass 2.x format. Tailored toward storing sensitive data, flexible enough to fit most use-case, and user-friendly enough to be used by an average user.
- deleted 6y ago[deleted]
- Rizzoli_88 6y agoAnd why not to use https://passwordlive.github.io/ https://passwordlive.github.io/ instead?
- tzs 6y agoThat appears to be a password generator. Given a secret and a name, it generates a password. You memorize that one secret, and use that and a name associated with each site to generate a password for that site. This can seem like a good idea, right up until you run into a site that requires periodic password changes leading to "name" becoming "name2", "name3", ... over time, and you needing to remember which one is current. That one also requires you to select the password length. Unless you find it acceptable to limit all passwords to the minimum of the maximum lengths allowed at all the sites you use, you will also need to remember for each site how long the password is. Same goes for character class restrictions and requirements. Password generators can work reasonable well, but generally only if they are coupled with storage to remember where you are in password rotation, password length, and character set rules for each site.
- TheDong 6y agoSome discussion of flaws of deterministic password managers can be found here [0] (HN discussion [1]). Security experts generally seem to agree that a stateful password store is a more security password manager than a deterministic scheme. [0]: https://tonyarcieri.com/4-fatal-flaws-in-deterministic-password-managers https://tonyarcieri.com/4-fatal-flaws-in-deterministic-passw... [1]: https://news.ycombinator.com/item?id=13016132 https://news.ycombinator.com/item?id=13016132
- robobro 6y agoI'll stick with keypass, thanks... not sure what this solution offers that others do better
- q0x 6y agoI
- q0x 6y agoI've been using gopass to store and share passwords with team members at work https://www.gopass.pw https://www.gopass.pw It's pretty much the same as pass, where each password is stored in a .gpg encrypted file, but written in go so it works with both Mac and Windows.
- okennedy 6y agoThere's one advantage to this approach that, as far as I've seen, no other password manager has been able to replicate. Pass is simple. It is literally a few hundred lines of clear, easy to read bash shell script (yeah, that's a phrase I never thought I'd hear myself saying, ever). It's simple because it's created by composing standard, simple off-the-shelf technologies (bash, gpg, git). Compared to more monolithic solutions, it's easy to compose those very same technologies in a different way. That, in turn, makes it easy to adapt to new settings, and super resilient to new use cases like different sync technologies. (and yes, I do appreciate that this is not a feature that everyone wants/needs)
- Kwpolska 6y agopass is simple on *nix. Pass is just painful on Windows and Android, probably on iOS too. I used to use pass for my passwords, but one day I switched to KeePassXC, which is a nice multiplatform GUI, has all the GUI niceties (and auto-type), there are mobile apps to work with it, and I keep my database synced with OneDrive.
- 8organicbits 6y agoI've been wary to trust the sync behavior of tools like dropbox or onedrive, as they permit concurrent edits of files. For things like encrypted password databases, there isn't an automated merge strategy that can be applied. I think they support versioning, so if two edits happened concurrently then the losing edit would be recoverable via versioning. Maybe that's not really a concern for a password database, as you'd likely be online when making a change? Anyone see issues with KeePass and sync tools?
- caesarshift 6y agoYes, in my experience, using dropbox, you end up with two versions of the keypass file (one listed as a conflict). I've been using this setup for ~10 yrs, and it has only happened 2 or 3 times, but as I'm the primary user, I would expect this to happen more often with a family sharing the same file. If things are working correctly, the keepass lock file created when opening a db is synced via dropbox, so any second attempt at opening the file on another system results in a warning to open it as readonly.
- ktm5j 6y agopass is really the best way to do gpg encrypted password management (imo) https://www.passwordstore.org/ https://www.passwordstore.org/
- nimitz12 6y agoBlog post author here, I'm very glad to see my post on HackerNews since I've been a long time reader. As many have pointed out, one big flaw in this blog post is that pass allows multi-line edit, I've corrected that in the blog post. Many alternatives have been suggested here, I will sure to try them out someday, thanks!
- anon776 6y agoQuick tip. %gpg -c somefile.txt Enter a passphrase. Boom you have somefile.txt.gpg, no need to deal with keys, just do not forget your passphrase.
- sooheon 6y agoThe only thing this is missing is OTP generation. 1Password does this for me, I don't know of any open source toolchain that makes this simple.
- samb1729 6y agogopass[0] is more or less a superset of pass written in Go that will do this for you. I’ve been using it for a few years syncing between iOS and macOS with no issues. [0]: https://github.com/gopasspw/gopass https://github.com/gopasspw/gopass
- AnonHP 6y agoBitwarden does TOTP generation and is open source (also has a CLI tool), but I do not know if it would fit your use cases and needs.
- war1025 6y agoI think `pass` has an official extension to handle OTP, but here is how I do it: #/bin/bash clip $(oathtool -b --totp "$(pass show otp/$1 | head -n 1)") Basically there is a really handy utility called `oathtool` you can install that has all the one time password logic built into it. Then in my `pass` store I have a `otp` folder where I put the codes for my different services. So to get the OTP code for paypal for example, I do this: pass otp paypal And then the code is copied to my clipboard and I can just paste it.
- gitweb 6y agoPass already has OTP. It is usually in the pass-otp package, both the Android app and the browser extensions support it as well.
- cantrevealname 6y agoI hope this is not too obvious a thing to mention, but if you want a really bare bones plaintext password manager on Linux, then use vim with its encryption mode: To create your list of usernames and passwords, create an encrypted file as follows (you'll be prompted to choose a passphrase): vim -x /path/to/passwordfile To access or update your list of usernames and passwords: vim /path/to/passwordfile The above autodetects that the file is encrypted (so the -x is no longer needed) and you'll will be prompted for your passphrase. Modern versions of vim use Bruce Schneier's highly regarded Blowfish algorithm. Type :set cm? while in vim to verify that it reports the algorithm as blowfish or blowfish2. I haven't tried vim on Android and iOS, so I don't know how convenient this would be on smartphones, but for Linux, I can't think of any simpler way for keeping an encrypted file of freely formatted text.
- duozerk 6y agoAs for emacs users, the EasyPG package (https://www.emacswiki.org/emacs/EasyPG https://www.emacswiki.org/emacs/EasyPG) offers a similar feature - it uses GPG directly, though.
- erk__ 6y agoEmacs also have its own internal password system with .authinfo.gpg a nice small walkthrough of the system is here https://www.masteringemacs.org/article/keeping-secrets-in-emacs-gnupg-auth-sources https://www.masteringemacs.org/article/keeping-secrets-in-em...
- duozerk 6y agoGood to know, thanks !
- dchest 6y agoPlease, do not use vim crypto for anything serious, such as password storage. It has a weak KDF, is malleable (especially important if you decide to sync your password files), and most important, the authors disregard suggestions of competent people https://github.com/vim/vim/issues/638 https://github.com/vim/vim/issues/638
- fy20 6y agoIf anyone wants a self-hosted password manager I'd highly recommend BitWarden. I originally used pass (with some custom scripts to read the current URL from Chrome and copy the password for that domain), but then switched to 1Password when they came out with their cross-platform browser extensions. Having a browser extension to automatically generate and save usernames and passwords, and something that supports syncing out-of-the-box makes password management a whole lot easier. Earlier this year I switched to BitWarden (with bitwarden-rs as the server) and it is 95% as good as 1Password. I'm happy to have something self-hosted to manage this.