Evidlo / passhole

A secure hole for your passwords (KeePass CLI)
GNU General Public License v3.0
199 stars 19 forks source link

Installation of passhole without prompting to give database a name #30

Closed ReneFroger closed 3 years ago

ReneFroger commented 4 years ago

I have the following script to automate the installation of Passhole:

# Passhole
sudo -H pip3 install passhole
# After synchronisation, link passhole configuration
sudo /bin/rm -f /home/user/.local/passhole
sudo mkdir -vp /home/user/.local/passhole
sudo ln -sfvn /home/user/Dropbox/Dot/.local/passhole/passhole.kdbx /home/user/.local/passhole/passhole.kdbx
ph --database /home/user/.local/passhole/passhole.kdbx init

The latest commands ask me everytime to give the database a name. I looked in the documentation to give a name in the flag parameter, but I couldn't find anything relevant.

I tried the following:

echo "passhole" | ph --database /home/user/.local/passhole/passhole.kdbx init

but it's causing problems when he is trying to reading that line. Is there any way to prevent that being asked, to include passhole in an unattended installation of all packages?

ReneFroger commented 4 years ago

Another way is to solve this issue with modifying the function that reads the line of database name: https://stackoverflow.com/questions/55158841/stop-script-eoferror-eof-when-reading-a-line

Evidlo commented 4 years ago

Can you give me some background? Why are you trying to automate initialization?

ReneFroger commented 4 years ago

Because I use the same setup on multiple laptops, my whole .config folder is synchronized with Dropbox. I wrote a bash script that installs all the packages in once, without attending. It's helpful, because sometimes I mess my setup up.

Recently I have Passhole included in my bash script, but it interrupt the whole installation procedure to ask me to give the database a name.

Evidlo commented 3 years ago

This should be fixed with https://github.com/Evidlo/passhole/commit/efb6187feb2ee41091ed73a47c9ad9480c872837.

Let me know what you think.