I want to script creation of a new empty database. I would be using powershell and loading the keepass dll.
I will be writing the script so that when it's launched from a shortcut it will check if a user's DB exists and either connecting to it or creating a new one and prompting user for password.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can create a new empty database and use powershell to copy it, but the only way to pre-expire the Master Key is to set the 'Force changing the key (days):' to a short period and distribute after the period has expired. However, users would need to know how to adjust this setting to avoid their Master Key being regularly expired after a short period.
Your best bet is to teach users how to create a new database (Select 'File>New') and advise them where to store it (e.g. a sub directory of 'My Documents'). You can specify the minimum requirements of the Master Key in an enforced configuration file that you distribute. The minimum password setting can limit the Master Key to a master password only, which will help avoid the problems associated with compound Master Keys.
Another alternative would be to distribute the new database with an un-expired but awkward password with instructions to change it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to script creation of a new empty database. I would be using powershell and loading the keepass dll.
I will be writing the script so that when it's launched from a shortcut it will check if a user's DB exists and either connecting to it or creating a new one and prompting user for password.
You can create a new empty database and use powershell to copy it, but the only way to pre-expire the Master Key is to set the 'Force changing the key (days):' to a short period and distribute after the period has expired. However, users would need to know how to adjust this setting to avoid their Master Key being regularly expired after a short period.
Your best bet is to teach users how to create a new database (Select 'File>New') and advise them where to store it (e.g. a sub directory of 'My Documents'). You can specify the minimum requirements of the Master Key in an enforced configuration file that you distribute. The minimum password setting can limit the Master Key to a master password only, which will help avoid the problems associated with compound Master Keys.
Another alternative would be to distribute the new database with an un-expired but awkward password with instructions to change it.
New DB, no copying
Nope.
Have you looked at Matt's PowerShell bits?
https://github.com/matt2005/KeePassPowershell
cheers, Paul
Looks like I've seen this before but it doesn't have any specific methods for creating a new DB