Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Robert Labudda
utils
Commits
96e3c383
Commit
96e3c383
authored
Apr 07, 2022
by
Robert Labudda
Browse files
getpassword.sh: include access to keepassxc 'service' group
parent
e4b18fa5
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
96e3c383
...
...
@@ -48,9 +48,9 @@ Requirements: gopass, dmenu, xdotool
getpassword.sh
--------------
A shell script to obtain (encrypted) passwords from
`~/.passwords/`
f
or
use in
other shell scripts that require passwords (like
`msmtp`
,
`vdirsyncer`
,
`mbsync`
/
`isync`
,
`fetchmail`
, etc.etc)
A shell script to obtain (encrypted) passwords from
`~/.passwords/`
or
`keepassxc`
for use in
other shell scripts that require passwords (like
`msmtp`
,
`vdirsyncer`
,
`mbsync`
/
`isync`
,
`fetchmail`
, etc.etc)
To put a password in place you could read it in and encrypt it like this:
...
...
@@ -70,6 +70,8 @@ ask you for it.
Requirements: bash, gpg, pinentry
Optional: keepassxc, secret-tool
findpgpkey.py
-------------
...
...
getpassword.sh
View file @
96e3c383
#!/bin/bash
# ~/bin/getpassword.sh
# ~/
.local/
bin/getpassword.sh
NAME
=
$1
if
[
-n
"
$(
pgrep keepassxc
)
"
]
then
secret-tool lookup service
"
$NAME
"
if
[
$?
=
0
]
then
exit
0
fi
fi
if
[
-e
"
$HOME
/.passwords/
$NAME
.asc"
]
then
gpg
-o
-
--for-your-eyes-only
-d
$HOME
/.passwords/
$NAME
.asc 2> /dev/null
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment