User Tools

Site Tools


config:keepass

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
config:keepass [2022/10/20 09:37] – [Keepass2.exe.config error] Wulf Rajekconfig:keepass [2023/07/06 13:19] (current) Wulf Rajek
Line 18: Line 18:
 ===== Keepass2.exe.config error ===== ===== Keepass2.exe.config error =====
 <code> <code>
 +sudo apt-get install mono-utils
 monodis --assembly /usr/lib/keepass2/KeePass.exe | grep Version | sed 's|Version:\ *\([0-9\.]*\)$|\1|' monodis --assembly /usr/lib/keepass2/KeePass.exe | grep Version | sed 's|Version:\ *\([0-9\.]*\)$|\1|'
 sudo vi /usr/lib/keepass2/KeePass.exe.config sudo vi /usr/lib/keepass2/KeePass.exe.config
Line 23: Line 24:
  
 Oneliner: Oneliner:
-sudo sed -i 's/newVersion="\([0-9\.]*\)"/newVersion='$(monodis --assembly /usr/lib/keepass2/KeePass.exe | grep Version | sed 's|Version:\ *\([0-9\.]*\)$|\1|')')/' /usr/lib/keepass2/KeePass.exe.config+sudo sed -i 's/newVersion="\([0-9\.]*\)"/newVersion='$(monodis --assembly /usr/lib/keepass2/KeePass.exe | grep Version | sed 's|Version:\ *\([0-9\.]*\)$|\"\1|')'\"/' /usr/lib/keepass2/KeePass.exe.config 
 +</code> 
 + 
 +Auto patching of config file, create shell script and apt pre-inst hook (no post inst hook available as per https://askubuntu.com/questions/869219/how-can-i-run-a-script-after-a-specific-package-is-upgraded)
 +<code bash /usr/local/bin/fix-keepass2-config.sh> 
 +#!/bin/bash 
 +if grep -q keepass2 
 +then 
 +    if [ ! -f /usr/bin/monodis ] 
 +    then 
 +        echo "monodis is required to fix the keepass2 config file." 
 +        echo "Please install it via apt-get install mono-utils" 
 +        exit 1 
 +    else  
 +        echo "Scheduling config update for keepass2 in 5 minutes..." 
 +        ( 
 +        sleep 300; 
 +        sed -i 's/newVersion="\([0-9\.]*\)"/newVersion='$(monodis --assembly /usr/lib/keepass2/KeePass.exe | grep Version | sed 's|Version:\ *\([0-9\.]*\)$|\"\1|')'\"/' /usr/lib/keepass2/KeePass.exe.config 
 +        ) & 
 +    fi 
 +fi 
 +</code> 
 +<code - /etc/apt/apt.conf.d/99-keepass2-hook> 
 +DPkg::Pre-Install-Pkgs {"/usr/local/bin/fix-keepass2-config.sh";}; 
 +DPkg::Tools::Options::/usr/local/bin/fix-keepass2-config.sh::Version "1"; 
 +</code> 
 +<code> 
 +sudo chmod 755 /usr/local/bin/fix-keepass2-config.sh
 </code> </code>
  
Line 255: Line 283:
 set google sync plugin to sync both on saving and opening set google sync plugin to sync both on saving and opening
  
 +===== KeeAutoExec plugin =====
 +
 +This plugin automatically opens additional databases.
 +
 +https://keepass.info/plugins.html#keeautoexec
 +
 +Installation:
 +<code>
 +wget https://keepass.info/extensions/v2/keeautoexec/KeeAutoExec-2.6.zip
 +sudo mkdir -p /usr/lib/keepass2/Plugins/
 +sudo unzip KeeAutoExec-2.6.zip -d /usr/lib/keepass2/Plugins/
 +rm KeeAutoExec-2.6.zip
 +</code>
 +Then restart keepass
  
 +To use:
 +  * Create a new group in your database and name it "AutoOpen" (without the quotes).
 +  * Each non-expired entry in this group corresponds to a database that should be opened automatically when the current database is opened. The fields of each entry specify the following:
 +    * Title: Ignored by the plugin; can be used for comments.
 +    * User name: Must contain the path to the key file, if one should be used. The path can be either absolute or relative to the directory containing KeePass.exe.
 +    * Password: The master password for the database to open. If no password is required, leave this field empty.
 +    * URL: Path to the database file to open. The path can be either absolute or relative to the directory containing KeePass.exe.
 +  * Server credentials. When opening a database from a URL, the credentials for accessing the file on the server can be specified using the custom entry strings "IocUserName" and "IocPassword". These strings must not contain new-line characters.
 +  * Custom entry string "Visible" set to "False" will hide autoopen entries from Menu -> open
 +  * Custom entry string "Focus" set to "Restore" will switch the active tab to the main database again.
config/keepass.1666255061.txt.gz · Last modified: 2023/05/29 11:53 (external edit)