PWCLIP(1)

NAME
pwclip - pwclip documentation

SYNOPSIS

pwclip [options]

DESCRIPTION

pwclip is a password management tool. It’s main target is having fast and comfortable access to passwords by storing them for a variable time in the systems clipboard (copy/paste) buffer.

It basically has two operating modes. One is for operating on yubikeys to generate uniq responses which might be used as passwords while they can be generated by that exact yubikey only. The first yubikey found on the system and the first slot, configured with (HMAC-SHA1) challenge-response, will be used. For that function Windows is supported (see “Install” section).

The second operating mode does currently only work (as so far tested) on Linux due to lack of cmdline handling of gpg4win (which i am not sure about and will go into as soon as i find the time and motivation for that). It can be used to create a ~/.pwdcrypt file which is gpg encrypted text using either the value of GPGKEYS as gpg recipients if found in environment otherwise every key within the users keyring will be used. For password-list managing there is a simple “import” function. On startup it lookes for a ~/.pwd.yaml file and if found merged with the already known passwords from the ~/.passcrypt if there is one. All entrys in ~/.passcrypt will be overridden by the entrys from the ~/.pwd.yaml file. As soon as it has been merged the ~/.pwd.yaml file will be deleted. See “YAML-Format” section for details.

To catch user input python’s Tk (tkinter) library is used to create a simple password input window. The appropriate response is saved for only 3 seconds by default to not have it exposed as soon as it’s used. The utility also supports the input of any integer which is then used as timer. Otherwise the environment is searched for PWCLIPTIME and uses the value of that environment variable as timer. The timer is used as time in which the received password stays in the paste buffer bevore its replaced by the previously copied value. As you may see there is an optional commet which is used as text notification displayed on the screen if set. Therefor python3’s gi notify2 is used which is another reason for discontinuing python2 support.

I highly encourage you to bind pwclip to a shortcut within your X-Environment to have access to your stored passwords from within any program. For example i like binding it to Super-Middle-Mouse-Button for the pwclip default mode and Strg-Shift-Middle-Mouse-Button for the yubico mode. On Windows-Systems you need to create a link for it somewhere. When editing that link you may set a keyboard shortcut (could not find a nicer solution by now). The target for that link then whould be “%PYTHONINSTALLDIR%\scripts\pwclip.exe”.

Last but not least i want to point something out: I’ve been trying my best to keep the passwords secure from unwanted access BUT there is !NO GUARANTEE! that the passwords handled with during runtime are safe from other users access, especially root access on linux systems (help on that is very welcome). Please be aware of that.

Since version 1.2 openssl keys are supported. For use with pwclip they will be converted to gpg-keys (gpgsm) automaticly - openssl is not used for en/decryption.

—

realsystemuser:

- somename:
    - Som3(rypt!cPass

    - Some optional info to display as popup notification

- othername:
    - Som3other(rypt!cPass

OPTIONS

--version
    show program’s version number and exit

-D, --debug
    debugging mode

-A, --all
    switch to all users entrys (“d0n” only is default)

-o, --stdout
    print password to stdout (insecure and unrecommended)

-s, --show-passwords
    show passwords when listing (replaced by “*” is default)

-t seconds
    time to wait before resetting clip (3 is default)

-p PWD, --password PWD
    enter password for add/change actions (insecure & not recommended)

--comment COM
    enter comment for add/change actions

-R  use remote backup given by –remote-host

--remote-host HOST
    use HOST for connections

--remote-user USER
    use USER for connections to HOST (“d0n” is default)

-r ID ... , --recipients ID ...
    one ore more gpg-key ID(s) to use for encryption (strings seperated by spaces within “”)

-u USER, --user USER
    query entrys only for USER (-A overrides, “d0n” is default)

-x, --x509
    force ssl compatible gpgsm mode - usually is autodetected (use –cert & –key for imports)

-C SSL-Certificate, --cert SSL-Certificate
    one-shot setting of SSL-Certificate

-K SSL-Private-Key, --key SSL-Private-Key
    one-shot setting of SSL-Private-Key

--ca SSL-CA-Certificate, --ca-cert SSL-CA-Certificate
    one-shot setting of SSL-CA-Certificate

-P CRYPTFILE, --passcrypt CRYPTFILE
    set location of CRYPTFILE to use as password store (~/.passcrypt is default)

-Y YAMLFILE, --yaml YAMLFILE
    set location of YAMLFILE to read whole sets of passwords from a yaml file (~/.pwd.yaml is default)

-S {1,2}, --slot {1,2}
    set one of the two yubikey slots (only useful with -y)

-y [SERIAL], --ykserial [SERIAL]
    switch to yubikey mode and optionally set SERIAL of yubikey (autoselect serial and slot is default)

-a ENTRY, --add ENTRY
    add ENTRY (password will be asked interactivly)

-c ENTRY, --change ENTRY
    change ENTRY (password will be asked interactivly)

-d ENTRY [ENTRY ...], --delete ENTRY [ENTRY ...]
    delete ENTRY(s) from the passcrypt list

-l [PATTERN], --list [PATTERN]
    pwclip an entry matching PATTERN if given - otherwise list all entrys

EXAMPLES

Although is was planed as GUI-Program it’s also possible to be executed from terminals. For Windows, Linux and OSX there is an appropriate executable packed which might be executed like the following examples will show:

GPG-MODE

If there is an environment variable called GPGKEYS it will use those keys to encrypt on changes to the password file. To list the password file you may use the list switch followed by optional search pattern like:

pwcli -l

or

pwcli -l $PATTERN

as you can see the yaml format tends to be used for multiple user names to better manage large lists. By default the current users entrys will be listed only. To have them all listed (or searched for by the above pattern example) use:

pwcli -A -l $PATTERN

YUBIKEY-MODE

ykclip

The YKSERIAL environment variable is used if found to select the yubikey to use if more than one key is connected. Otherwise the first one found is chosen. Likewise it also accepts an option:

pwcli -y $YKSERIAL

To have it wait for a specific time like 60 seconds (bevore resetting the paste buffer to the previously copied value) the PWCLIPTIME environment variable is used or also the command accepts it as input:

pwcli -t 60 -l somename

Most of the options may be combined. For more information on possible options in cli mode please see:

pwcli --help

GUI-MODES

For the GUI-Mode just use one of the following commands, also accepting most of the commandline arguments:

pwclip

ykclip

not used by default but can be combined with every actions is the ftp sync feature which compares remote and local file timestams as well as copying it from or to that remote server (for obvious reasons not recommended but needed in some cases)

pwclip -R --remote-host my.secure.ftp.storage --remote-user remoteuser

SEE ALSO: gnupg(1), python(1)

AUTHOR
Leon Pelzer

COPYRIGHT
2018, Leon Pelzer