pass-update

roddhjavGPL-3.0长期未更新

给 pass 密码管理器加一条命令,就能按预设流程批量更新已存密码,省去逐个手动改的麻烦。

A pass extension that provides an easy flow for updating passwords.

v2.2.1发布于 2024-02-28 11:46 UTC327star27fork同步于 2026-11-07 07:33 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/roddhjav/pass-update/
cd pass-update
sudo make install
硬件要求按 README 说明

README 未说明,仅要求 pass 1.7.0+ 与 bash 4.0+

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

pass 密码管理器的扩展,提供批量更新密码的交互式流程

给 pass 密码管理器加一条命令,就能按预设流程批量更新已存密码,省去逐个手动改的麻烦。

核心能力

  • 支持按路径、目录和通配符批量更新密码
  • 可自动生成新密码或手动输入新密码
  • 默认只更新密码文件首行,可用 --multiline 更新多行
  • 用 --include/--exclude 正则筛选要更新的条目
  • 可指定密码长度、禁用符号或匹配原密码长度

容易踩的坑

需先安装 pass 1.7.0 及以上版本和 bash 4.0 及以上版本;默认会先打印旧密码并等待确认,脚本化使用需注意交互;OSX 上 make install 需加 PREFIX=$(brew --prefix)

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.2.1
  1. v2.2.1最新正式版2024-02-28 · 2024-02-28 11:46 UTC

    Fixed

    • Ensure that share/__main__.py is not part of the distribution packaging. #31
  2. v2.22024-02-26 · 2024-02-26 20:03 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/roddhjav/pass-update/compare/v2.1...v2.2

  3. v2.12018-12-11 · 2018-12-11 22:18 UTC
    查看更新说明

    Added

    • Add completion file for bash and zsh.
    • Add an --include option to only update the password that match a regex. #15
    • Add an --exclude option 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 -e option now means --exclude while -E means --edit.
    • The test suite has been simplified and the tests extended.
    • Multiple bash issues have been fixed.

    Requirements

    • pass 1.7.0 or greater.

    This release is signed using the GPG key 06A26D531D56C42D66805049C5469996F0DF68EC

  4. v2.02017-09-16 · 2017-09-16 20:18 UTC
    查看更新说明

    This release is signed using my GPG key 06A26D531D56C42D66805049C5469996F0DF68EC

    New 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.0 or 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'
  5. v1.02017-04-14 · 2017-04-14 17:56 UTC
    查看更新说明
    • Add --no-symbols option in order to not use any non-alphanumeric characters in the generated password
    • Add the ability to set the password length with the new --length option
    • Multiple bug fixed

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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.0 or greater.
    • bash 4.0 or 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.