需先安装 pass 1.7.0 及以上版本和 bash 4.0 及以上版本;默认会先打印旧密码并等待确认,脚本化使用需注意交互;OSX 上 make install 需加 PREFIX=$(brew --prefix)
pass-update
roddhjavGPL-3.0长期未更新给 pass 密码管理器加一条命令,就能按预设流程批量更新已存密码,省去逐个手动改的麻烦。
A pass extension that provides an easy flow for updating passwords.
git clone https://github.com/roddhjav/pass-update/
cd pass-update
sudo make installREADME 未说明,仅要求 pass 1.7.0+ 与 bash 4.0+
pass 密码管理器的扩展,提供批量更新密码的交互式流程
给 pass 密码管理器加一条命令,就能按预设流程批量更新已存密码,省去逐个手动改的麻烦。
核心能力
- 支持按路径、目录和通配符批量更新密码
- 可自动生成新密码或手动输入新密码
- 默认只更新密码文件首行,可用 --multiline 更新多行
- 用 --include/--exclude 正则筛选要更新的条目
- 可指定密码长度、禁用符号或匹配原密码长度
容易踩的坑
- v2.2.1最新正式版2024-02-28 · 2024-02-28 11:46 UTC
Fixed
- Ensure that
share/__main__.pyis not part of the distribution packaging. #31
- Ensure that
- v2.22024-02-26 · 2024-02-26 20:03 UTC
查看更新说明
What's Changed
- Fix spelling error by @jboyens in https://github.com/roddhjav/pass-update/pull/21
- Correct installation instructions by @DanielVartanov in https://github.com/roddhjav/pass-update/pull/24
- Add the
-aoption to generate password with the same length than the former ones. - The man pages are now generated from markdown with pandoc.
- Automated release process.
- Updated the sharness test suite to
1.2.0
New Contributors
- @jboyens made their first contribution in https://github.com/roddhjav/pass-update/pull/21
- @DanielVartanov made their first contribution in https://github.com/roddhjav/pass-update/pull/24
Full Changelog: https://github.com/roddhjav/pass-update/compare/v2.1...v2.2
- v2.12018-12-11 · 2018-12-11 22:18 UTC
查看更新说明
Added
- Add completion file for bash and zsh.
- Add an
--includeoption to only update the password that match a regex. #15 - Add an
--excludeoption to not update the password that match a regex. - Add ability to skip certain password modification. #12
- Added Gitlab CI and tests on Archlinux, CentOS, Debian, OpenSUSE, Ubuntu and Fedora.
- Added this changelog.
Changed
- The
-eoption now means--excludewhile-Emeans--edit. - The test suite has been simplified and the tests extended.
- Multiple bash issues have been fixed.
Requirements
pass 1.7.0or greater.
This release is signed using the GPG key
06A26D531D56C42D66805049C5469996F0DF68EC - v2.02017-09-16 · 2017-09-16 20:18 UTC
查看更新说明
This release is signed using my GPG key
06A26D531D56C42D66805049C5469996F0DF68ECNew features For this release, most of the source code has been completely re-implemented. It allows us to provide the following new features in order to make password update an easier flow:
- Support file, directory and wildcard update.
- Let the user specify a password by hand:
--provide,-p - Update a multi-line password:
--multiline,-m - Edit the password using the default editor:
--edit,-e
Requirements
pass 1.7.0or greater.- If you do not want to install this extension as system extension, you need to
enable user extension with
PASSWORD_STORE_ENABLE_EXTENSIONS=true pass. You can create an alias in.bashrc:alias pass='PASSWORD_STORE_ENABLE_EXTENSIONS=true pass'
- v1.02017-04-14 · 2017-04-14 17:56 UTC
查看更新说明
- Add
--no-symbolsoption in order to not use any non-alphanumeric characters in the generated password - Add the ability to set the password length with the new
--lengthoption - Multiple bug fixed
- Add
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
pass update
A pass extension that provides an easy flow for updating passwords.
Description
pass update extends the pass utility with an update command providing
an easy flow for updating passwords. It supports path, directory and wildcard
update. Moreover, you can select how to update your passwords by automatically
generating new passwords or manually setting your own.
pass update assumes that the first line of the password file is the password
and so only ever updates the first line unless the --multiline option is
specified.
By default, pass update prints the old password and waits for the user before
generating a new one. This behaviour can be changed using the provided options.
Usage
pass update 2.2.1 - A pass extension that provides an easy flow for updating passwords.
Usage:
pass update [-h] [-n] [-l <s>] [-c | -p] [-p | -m]
[-e <r>] [-i <r>] [-E] [-f] pass-names...
Provide an interactive solution to update a set of passwords.
pass-names can refer either to password store path(s) or to
directory.
It prints the old password and waits for the user before generating
a new one. This behaviour can be changed using the provided options.
Only the first line of a password file is updated unless the
--multiline option is specified.
Options:
-c, --clip Write the password to the clipboard.
-n, --no-symbols Do not use any non-alphanumeric characters.
-l, --length <s> Provide a password length.
-a, --auto-length Match the previous password's length.
-p, --provide Let the user specify a password by hand.
-m, --multiline Update a multiline password.
-i, --include <r> Only update the passwords that match a regex.
-e, --exclude <r> Do not update the passwords that macth a regex.
-E, --edit Edit the password using the default editor.
-f, --force Force update.
-V, --version Show version information.
-h, --help Print this help message and exit.
More information may be found in the pass-update(1) man page.
See man pass-update for more information.
Examples
Update Social/twitter.com
pass update Social/twitter.com
Changing password for Social/twitter.com
[}p&62"#"x'aF/_ix}6X3a)zq
Are you ready to generate a new password? [y/N] y
The generated password for Social/twitter.com is:
~*>afZsB+G\,c#+g$-,{OqJ{w
Update all the Emails
pass update Email
Changing password for Email/donenfeld.com
b9b"k(u#m7|ST-400B5gM%[Kq
Are you ready to generate a new password? [y/N] y
The generated password for Email/donenfeld.com is:
m6~!b5U`OhloT~R,4-OCa:h$Q
Changing password for Email/zx2c4.com
HWl7u\Aqdk]AY$y!='@>]8"@`
Are you ready to generate a new password? [y/N] y
The generated password for Email/zx2c4.com is:
@uLYW_X9a",?wDQN=hp/^Z!$J
Set password length
pass update -l 50 France/bank
Changing password for France/bank
9b'I;]b)>06xug!3.ME1*E+M3
login: zx2c4
Are you ready to generate a new password? [y/N] y
The generated password for France/bank is:
|3=&{ko:#I|A,P4*=[|hk^/V4jIcRN.uBBd-~RB0_L<sS[%k%-
Provide a password by hand
pass update -p Business/site.com
Changing password for Business/site.com
Zk=u]HqjUAKPZ$gM_,LuZV8J2
login: zx2c4
Are you ready to provide a new password? [y/N] y
Enter the new password for Business/site.com:
Retype the new password for Business/site.com:
Do not update PIN code
pass update --exclude '^[0-9]+$' /
Update only PIN code
pass update --include '^[0-9]+$' /
Installation
Requirements
pass 1.7.0or greater.bash 4.0or greater.
ArchLinux
pass-update is available in the Arch User Repository.
yay -S pass-update # or your preferred AUR install method
Debian/Ubuntu
pass-update is available my own debian repository with the package name
pass-extension-update. Both the repository and the package are signed with
my GPG key: 06A26D531D56C42D66805049C5469996F0DF68EC.
wget -qO - https://pkg.pujol.io/debian/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/pujol.io.gpg >/dev/null
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/pujol.io.gpg] https://pkg.pujol.io/debian/repo all main' | sudo tee /etc/apt/sources.list.d/pkg.pujol.io.list
sudo apt-get update
sudo apt-get install pass-extension-update
NixOS
nix-env -iA nixos.passExtensions.pass-update
OSX
pass-update is available with Homebrew using a third-party repository
brew tap simplydanny/pass-extensions
brew install pass-update
From git
git clone https://github.com/roddhjav/pass-update/
cd pass-update
sudo make install # For OSX: make install PREFIX=$(brew --prefix)
Stable version
wget https://github.com/roddhjav/pass-update/releases/download/v2.2.1/pass-update-2.2.1.tar.gz
tar xzf pass-update-2.2.1.tar.gz
cd pass-update-2.2.1
sudo make install # For OSX: make install PREFIX=$(brew --prefix)
Releases and commits are signed using 06A26D531D56C42D66805049C5469996F0DF68EC.
You should check the key's fingerprint and verify the signature:
wget https://github.com/roddhjav/pass-update/releases/download/v2.2.1/pass-update-2.2.1.tar.gz.asc
gpg --recv-keys 06A26D531D56C42D66805049C5469996F0DF68EC
gpg --verify pass-update-2.2.1.tar.gz.sig
Contribution
Feedback, contributors, pull requests are all very welcome.