Key File location not remembered

Help
Woody
2011-03-23
2014-04-03
  • Woody
    Woody
    2011-03-23

    Sorry if this has been discussed, but since I upgraded to version 2.14, the application no longer remembers my key file location when I start a new session.  I have the "remember key sources" option checked.  Is there something else I need to do?

     
  • wellread1
    wellread1
    2011-03-23

    That setting should be sufficient.  Could you provide a few more details about how you are using keepass

    What do you mean by:

    when I start a new session

    ? e.g. are you starting a brand new simultaneous instance of keepass, or sequentially opening keepass, closing it and opening a new session, or opening a second database in a current instance? 

    Are you using command line options? Are you starting keepass using the same shortcut each time? Are you using a keepass.enforced.confing.xml file?

    -wellread1

     
  • kidhazy
    kidhazy
    2013-08-21

    I recently moved to using keyfiles and have seen occasions where KeePass V2.23 doesn't remember the keyfile location when I unlock KeePass.

    It doesn't always happen and I haven't been able to pin-point the scenarios that make it happen. I have KeePass lock the workspace automatically when I lock my computer, and the "Remember key sources" option is enabled.

    Anyone get something similar?

    Thanks.

     
  • wellread1
    wellread1
    2013-08-21

    Do all your databases use key files? Do you ever have more than one open at the same time?

     
  • kidhazy
    kidhazy
    2013-08-22

    I have 2 databases. My main database has a key file. The 2nd database is simply a test backup I had been using before moving to a database with a key file (I haven't opened that 2nd database for over a month).

    I only ever have the main database open (ie. 1 database open)

    Thanks.

     
  • wellread1
    wellread1
    2013-08-22

    The most likely reason for KeePass to "not remember" the key file is that you are attempting to open/unlock the old database. When the problem happens again, carefully check the path displayed under the "Enter Master Key" banner on the Open database dialog to verify that you are attempting to open the database that needs the key file.

    Another possibility is that you have installed two copies of KeePass (usually an installed version and another portable version). These installations are likely to have separate configuration settings. If you have two copies of KeePass installed carefully note which copy you are running and check the Tools>Options>Advanced(tab)>Advanced(section); Remember key sources (key file paths, provider names,...) setting for each KeePass copy.

    If neither of the above situations is causing the problem you can look for evidence that KeePass is actually forgetting the path (not likely) by checking the config file (keepass.config.xml). This file is usually located in the user application directory "C:\Users\User Name\AppData\Roaming\KeePass\KeePass.config.xml" but can be in one of several other locations depending on how you installed/configured KeePass. The active config file will have a modified date corresponding to the time you last exited KeePass. Note: by default windows hides the App directory so you may need to unhide it.

    When KeePass is not running, open the keepass.config.xml with a text editor and search for the <KeySources> key. It should contain an entry listing the <DatabasePath> and its associated <KeyFilePath> saved as relative paths. When the problem happens again, repeat the procedure (you can open the file while KeePass is running) and check that the association in <KeySources> key still exists.

     
    • kidhazy
      kidhazy
      2013-08-26

      Thank you for your detailed reply.

      I'll use this information to see if I can see any changes in the config file when it happens again.

      (I may also look to do a complete uninstall/reinstall to ensure there's nothing left over from any previous updates/installs)

       
  • kidhazy
    kidhazy
    2013-08-26

    Just happened again. I checked the config file whilst KeePass had the Open Database dialog displayed prompting for the password and keyfile location (the key file field was showing "(None)").

    The config.xml still had the correct path specified in it for <KeyFilePath>.

    Interestingly if I click the folder icon next to the Key File field it takes me to the correct directory which holds my Key File. (Though this may be coming from one of the <WorkingDirectories> items)

    Looks like I'll try to uninstall/reinstall path.

     
    Last edit: kidhazy 2013-08-26
  • Paul
    Paul
    2013-08-26

    Re-install won't help.
    Check the configuration files are writeable.
    http://keepass.info/help/base/configuration.html

    cheers, Paul

     
  • kidhazy
    kidhazy
    2013-08-27

    Of the 4 config files that link refers to I've got 2 of them. Only the 2nd one (user based config) can be read/written by the current user.

    C:\Program Files (x86)\KeePass Password Safe 2\KeePass.config.xml (only entry is <PreferUserConfiguration>true</PreferUserConfiguration> )

    C:\Users\User Name\AppData\Roaming\KeePass\KeePass.config.xml

    Why do you say a re-install won't help? (I'm not saying it will, but it's often another thing to try ??)

     
  • Paul
    Paul
    2013-08-27

    Check that you have the PreferUserConfiguration line set to true in C:\Program Files (x86)\KeePass Password Safe 2\KeePass.config.xml.
    Make sure the RememberKeySources item is not false in that file too.

    cheers, Paul

     
  • Paul
    Paul
    2013-08-27

    Re-installing KeePass will retain your configuration settings.

    cheers, Paul

     
  • kidhazy
    kidhazy
    2014-03-31

    After suffering with this issue intermittently over the past few months, I updated the Advanced Options in KeePass to disable "Automatically search key files".

    Since changing the setting I haven't had the issue of the keyfile location not being remembered (it's been about 2 weeks since I made the change).

    Not entirely sure how this setting may relate to my issue, but so far I haven't seen it reoccur.

     
  • Paul
    Paul
    2014-04-01

    Try changing it back and see of the problem recurs.

    cheers, Paul

     
  • kidhazy
    kidhazy
    2014-04-02

    Good suggestion Paul.

    If I enable "Automatically search key files" and Exit KeePass, when I restart KeePass the "Key File" field in the Open Database window is empty.

    If I disable "Automatically search key files" and Exit KeePass, when I restart KeePass the "Key File" field in the Open Database window is populated with the last keyfile I used.

    So it looks like there is some linkage here.

     
  • Dominik Reichl
    Dominik Reichl
    2014-04-02

    This could have happened if you have an extremely slow (network) drive. Parallel searching and asynchronous updating has already been added for KeePass 2.26, see
    https://sourceforge.net/p/keepass/feature-requests/1829/

    Best regards,
    Dominik

     
  • kidhazy
    kidhazy
    2014-04-02

    Could be a possibility. I have several network shared drives mapped to my PC for when I'm at home. When at the office the drives are still mapped, but not accessible. I'll verify the behavior next time I'm connected to my home network, but I definitely see the behavior on the office network.

    I do have "Automatically search key files also on removable media" disabled.

     
  • Paul
    Paul
    2014-04-03

    You could try the dev snapshot in the thread Dominik linked.

    cheers, Paul