spm

Personal fork of spm (simple password manager)
git clone git@getsh.org:spm.git
Log | Files | Refs | README | LICENSE

spm.1 (3322B)


      1 .Dd April 21, 2017
      2 .Dt SPM 1
      3 .Sh NAME
      4 .Nm spm
      5 .Nd simple password manager
      6 .Sh SYNOPSIS
      7 .Nm
      8 .Cm add Oo Ar group/ Oc Ns Ar entry
      9 .Nm
     10 .Cm del Ar expression
     11 .Nm
     12 .Cm help
     13 .Nm
     14 .Cm list Oo Fl g Oc Op Ar group
     15 .Nm
     16 .Cm search Ar expression
     17 .Nm
     18 .Cm show Ar expression
     19 .Sh DESCRIPTION
     20 .Nm
     21 is a fully POSIX shell compliant script using
     22 .Xr gpg2 1
     23 for encryption.
     24 .sp
     25 Entries are stored in a classical filesystem hierarchy where passwords
     26 are encrypted as individual files and directories may be used as groups.
     27 This way users can control access through file ownership, share entries
     28 entries with symbolic links and more just like any other files.
     29 .sp
     30 Group and entry names or expressions are considered relative to the
     31 storage root directoy.
     32 .Ar expression
     33 is interpreted as basic regular expression according to
     34 .Xr re_format 7 .
     35 The following commands are available:
     36 .Bl -tag -width Ds
     37 .It Cm add
     38 Prompt for a password if standard output is a terminal otherwise read
     39 from standard input and store it as
     40 .Ar entry .
     41 If
     42 .Ar group
     43 is specified, non-existing groups are created automatically and the
     44 password is stored under
     45 .Ar group/ Ns Op Ar ../ .
     46 .It Cm del
     47 Ask for confirmation and delete the entry matching
     48 .Ar expression
     49 on success.
     50 .It Cm help
     51 Print a short usage and refer to this manual page.
     52 .It Cm list
     53 Print a recursive, indented tree-style list of all entries in
     54 .Ar group .
     55 If
     56 .Ar group
     57 is omitted, the entire storage root is listed.
     58 If the
     59 .Fl g
     60 flag is passed only subgroups are shown.
     61 .It Cm search
     62 Print the absoloute paths of all entries matching
     63 .Ar expression
     64 one per line.
     65 .It Cm show
     66 Print the password to standard output if
     67 .Ar expression
     68 uniquely matches an entry and prompt for the decryption passphrase if
     69 it is not cached by
     70 .Xr gpg-agent 1
     71 already.
     72 .El
     73 .Sh ENVIRONMENT
     74 The following environment variables will be used by
     75 .Nm
     76 if they are set and not empty:
     77 .Bl -tag -width Ds
     78 .It Ev PASSWORD_STORE_DIR
     79 The storage root directory.
     80 This should be an absoloute path.
     81 .It Ev PASSWORD_STORE_KEY
     82 Key ID used for de/encryption.
     83 Refer to
     84 .Xr gpg2 1
     85 for accepted formats.
     86 .El
     87 .Sh FILES
     88 .Bl -tag -width Ds
     89 .It Pa ~/.spm/
     90 The default storage root directory.
     91 .El
     92 .Sh EXIT STATUS
     93 .Nm
     94 exits 1 if an error occurs otherwise 0.
     95 .Sh EXAMPlES
     96 Add Alice's password to the group
     97 .Em users :
     98 .Bd -literal -offset indent
     99 $ spm add users/alice
    100 Password for 'users/alice':
    101 .Ed
    102 .sp
    103 Make sure she is an admin as well:
    104 .Bd -literal -offset indent
    105 $ (cd ~/.spm
    106 > mkdir admins
    107 > ln -s ../members/alice admins/alice)
    108 .Ed
    109 .sp
    110 Copy her password into the X selection ready to be pasted somewhere:
    111 .Bd -literal -offset indent
    112 $ spm show admins/alice | xclip -i
    113 .Ed
    114 .sp
    115 Find all admins starting with
    116 .Dq a
    117 or
    118 .Dq b :
    119 .Bd -literal -offset indent
    120 $ spm search admins/[ab]
    121 /home/alice/.spm/admins/alice
    122 /home/alice/.spm/admins/bob
    123 .Ed
    124 .sp
    125 List all users:
    126 .Bd -literal -offset indent
    127 $ spm list users
    128 /home/alice/.spm/users
    129 |-- alice
    130 |-- bob
    131 |-- temporary/
    132 |   |-- tim
    133 |   `-- tom
    134 .Ed
    135 .sp
    136 Find entries interactively using
    137 .Xr dmenu 1 :
    138 .Bd -literal -offset indent
    139 $ spm show "$(spm search . | dmenu -l 10)"
    140 .Ed
    141 .Sh SEE ALSO
    142 .Xr dmenu 1,
    143 .Xr gpg2 1 ,
    144 .Xr gpg-agent 1 ,
    145 .Xr tpm 1 ,
    146 .Xr tree 1 ,
    147 .Xr re_format 7
    148 .Sh CAVEATS
    149 Groups have to be deleted manually using
    150 .Xr rmdir 1 .
    151 .Sh AUTHORS
    152 .Nm
    153 is written by
    154 .An Klemens Nanni Aq Mt kl3@posteo.org .