#1582 References to other KeePass Databases

open
nobody
5
2015-07-06
2012-02-09
No

For a multi user envirnment it would be nice to separate private logins from shared logins.

The idea is to setup a private and a shared KeePass DB. Inside the shared DB are references to the private DB with the private logins. For easier understanding please take a look at the attached drawing.

Maybe the placeholder syntax could be enhanced like this to reflect the database name:

{REF:<WantedField>@<SearchIn>:<Text>@<Databasename>}

In my eyes it would be enough to give the databasename instead of a filename. So the DB can be stored somewhere and the user only has to take care that the other DB is opened. This way it would be easy to configure the private DB to open the shared DB with the help of the KeeAutoExec Plugin.

Discussion

  • Marc Laporte
    Marc Laporte
    2014-08-06

    Hi!

    Does KeeAutoExec help?

    "This plugin allows to automatically open additional databases when opening a database."
    http://keepass.info/plugins.html#keeautoexec

    Thanks!

     
  • Willem
    Willem
    2015-07-02

    Unfortunately the Autoexec does not solve this problem.
    I have the same request to make use of refferences in different KP databases within the same login sequence.

    I want to login with my Private Userid / Password (from Myown.kdbx) in a Mainframe application and then start the Mainframe application with a shared Userid / Password (from MyDept.kdbx").

    I have the same wish to use Ref-id's from both a Private "Myown-kdbx"and a Shared "MyDept.kdbx"

    For example I have a Keepass Entry with an Auto-Type Override default sequence like this:

    a{VKEY-EX 163}{DELAY 150}{REF:U@I:9E5518CF6189684CA8F557043B333117}{Tab}{REF:P@I:9E5518CF6189684CA8F557043B333117}{ENTER}1{ENTER}{DELAY 200}StartMainFrameApp{ENTER}{REF:P@I:AAE3AA615D50AC4891A7D727EB787E1F}{TAB}{Username}{ENTER}

    The Bold Ref-id's should refer to the items in "Myown.kdbx" database.

     
  • Paul
    Paul
    2015-07-02

    A discussion of references across databases.
    https://sourceforge.net/p/keepass/discussion/329220/thread/b43ca940/

    You could obtain the credentials via KPScript and save them in environment variables - not very secure.

    You could use a two part Auto-Type.

    cheers, Paul

     
    • Willem
      Willem
      2015-07-06

      Hi Paul,
      Thanks for your aswer. I would like to try it via Environment Variables.

      Can you give an example to store the Username into a Variable named: "MyUsername" and then how to put the Environment Variable into the Autotype sequense?

      I could not find any example hoe to do this within Keepass.

       
  • Paul
    Paul
    2015-07-06

    To store the data you need to do something like this.
    %comspec% /c for /f %X in ('path_to\KPScript.exe -c:GetEntryString "C:\KeePass\MyDb.kdbx" -pw:MyPassword -Field:UserName -ref-Title:"Demo Account"') do setx MyUsername=%X

    This is a command line string to return a value and then set the master environment with the value. the downside is the variable is available everywhere unless you "setx MyUsername=". Alternatively you could use "set" and then run KeePass next from the same command line / batch file. then the variable is only available to KeePass and is cleared when you close Keepass - if you use it in a batch file you don't need the "%comspec% /c".

    I just tested the following Auto-Type and it works as expected.
    {USERNAME}{TAB}{PASSWORD}{TAB}%APPDATA%

    cheers, Paul