Menu

#2855 KeeAutoExec, property to not open DB on pendrive

KeePass
open
nobody
KeeAutoExec (3)
5
2023-12-02
2023-12-01
No

I would like adding a new property or admit a new value on existing properties, to let KeeAutoExec know that some database hasn't to be opened automatically if KeePass is running from a pendrive.

This is because when I connect a pendrive on my pc, I can have a KeePass installed locally. So, I wouldn't like it to automatically open the entries related to my pc databases.
It even throw an error, because it uses a different path for the KeyFile.
On my pc, I store my keyfile inside the KeePass installation directory. But, on my pendrive it's stored outside, so it gives an error of missing keyfile.

Possible implementation:
It can be a new "boolean" property named like "EnabledInPendrive".

If the standard "Enabled" property is false or has no value, then it will open.
If the standard "Enabled" property is true, then:
If "EnabledInPendrive" value is true or has no value, then it will open. But, if it's false, it would check if KeePass is running from a pendrive, and if it is, then it wouldn't open that database. If not running from pendrive, then it will open.

Another way of implementing it:
Adding a value like "IfNotPendrive" on the standard "Enabled" property.

Another implementation that would work as a workaround:
Creating a property similar to "SkipIfNotExists" but for KeyFile instead of database.
Maybe naming it like "SkipIfNotKeyFileFound" and not giving error, neither opening the database if KeyFile isn't found for that entry.

Discussion

  • Paul

    Paul - 2023-12-01

    There is already a "SkipIfKeyFileNotExists" option in version 2.4.

    BTW, storing the key file on the same machine as the database defeats the point of a key file. The key file should not be available if you are not with the machine (something you have).

    cheers, Paul

     
    👍
    1
    • Santiago González

      TY so much. I didn't know that workaround was implemented.
      It solved my problem.

      Yeah, having the key file on the same machine defeats its purpose, but I don't want to connect a pendrive everyday.

      However, I have a SAMBA network share. Could I store my key file there?
      Would it defeat the point of having a key file?

       
  • wellread1

    wellread1 - 2023-12-01

    It is not clear how your databases are arranged, but I don't think it is necessary to add this feature to limit which databases each instance of KeePass opens.

    A general solution that should satisfy your requirements is to move all of your auto-open entries to a dedicated auto-open database, then configure each instance of KeePass to automatically open its own dedicated copy of the auto-open database, one copy for your pendrive and the other for your PC. Next customize each auto-open database so that it will open only the databases that you want to open with each instance of KeePass.

     
    👍
    1
    • Santiago González

      Yeah, I thought about it.

      Should be a little more efficent, because KeePass wouldn't do those checks at startup.
      But I would have multiple master databases. Like, one for pendrives and one for PCs.

      I don't know... it doesn't convence me...

       
  • Paul

    Paul - 2023-12-02

    I have a SAMBA network share. Could I store my key file there?

    This is much the same as storing it locally because it's permanently connected.
    There is also the issue of potentially needing the samba password from KeePass to connect to the key file.

    You need to decide if a key file gives you any additional security over the inability of using the database on another machine / disaster recovery.

    cheers, Paul

     
    👍
    1

Log in to post a comment.

MongoDB Logo MongoDB