Skip to content
/ rpw Public

Cache your sudo / become password in your shell

License

Notifications You must be signed in to change notification settings

thalesmg/rpw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

97bc4b3 · Jan 31, 2021

History

42 Commits
Jan 31, 2021
Jan 31, 2021
Jan 31, 2021
Feb 4, 2019
Feb 4, 2019
Jan 31, 2021
Oct 6, 2019
Feb 4, 2019
Jan 31, 2021
Oct 10, 2019
Feb 4, 2019
Oct 10, 2019
Feb 24, 2019
Oct 6, 2019
Oct 10, 2019
Feb 24, 2019
Jan 31, 2021
Jan 31, 2021

Repository files navigation

rpw Build Status

This is a Haskell implementation of cache-pw.

How to install

You need Stack.

$ stack install

How to use

$ rpw bash
$ sudo echo hello!
[sudo] password for foobar: (rpw..sudo) <-        # type your password and
                                                  # end with `Enter`, `C-j` or `C-m`
hello!
$ sudo -k
$ sudo echo hello!
[sudo] password for foobar: <- (rpw..cached)      # no need to type here!
hello!
$ ansible-playbook playbook.yml -K
SUDO password: <- (rpw..cached)                   # no need to type here!
 _____________________
< PLAY [Some playbook!] >
 ---------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Testing

You need docker and docker-compose for this:

make test

TODO

  • Allow resetting the password without exiting the shell.
  • Emit SIGWINCH to the slave terminal when needed.