KeePass is a great tool for the individual but no so for the corporate user. The problem for the corporate user is that if you have the password to the KeePass file then you have access to all the passwords in the file.
This is where a product like Password Manager Pro comes in to it’s own. You can add in all the passwords but restrict users to see only specific passwords share out to them and more importantly you can add workflow into the mix, i.e. a user needs approval before he can see a password and that access is audited. The latter option means you can take action as part of the leaver process and you can also use this audit data to reset passwords to ensure that they have not been written down for later use. Add in the ability to automate password resets and you are starting to see the real power of a password management solution.
This post is to document some of the things I discovered about the process of exporting the password out of KeePass and placing them in Password Manager Pro. I wouldn’t say you have to read this before doing this yourself but it might save you some time and heart ache when you do your own migrations.
KeePass has an export function that exports the password data to a CSV file. The exported file will have the following columns which relate to thePMP import columns
|KeePass Column Name||PMP Column|
|Login Name||User Account|
|Web Site||Resource URL|
To import into PMP you will want to add some more information. It is also unlikely that the format used to store the data in KeePass is ideal for storage in PMP. In my implementation I added a custom field “ResourceGroups” which allows me make use of dynamic “resource groups” to provide some order to eh accounts stored in PMP and make it easy to share out these groups to different teams.
Open the CSV file and sort the user accounts into PMP “resource types”.
A Resource can only hold one type of user account, i.e. you cannot store a user account for a web site with a user account for a windows server. This is because the resource type can only contain one user account type as the resource type specifies what fields are available for the user accounts and also if the resource has an associated RDP / SSH or Web address.
Create a new CSV file for each resource type. This has two benefits, a smaller set of accounts to import during each import which makes it easier to check that all of the accounts were imported.
The KeePass Account column will usually serve as the description column and the Comments will become the notes column in the PMP import file. Set the Resource Name column in each file to a value that will identify the resource being imported. You can optionally add data to the Department, Location and Resource group columns. These attributes can be used to group the imported user accounts into resource groups.
For website accounts the “web site” column in the KeePass export becomes the Resource URL in the PMP import file.
For windows, Linux and HP iLO accounts populate the Resource Name with the Windows server name and the DNS name with the FQDN or IP address of the server.
For domain accounts set the OS Type column to “WindowsDomain”
In all cases set the ResourceGroup column to the same value. This will allow you to create a resource group in PMP and view the imported values. It also avoids an input error where the number of populated cells in row one do not match the subsequent rows which causes an import error.
NOTE: that each row in your CSV file will hold all of the information for both the resource and the user account to be added to the resource. The resource is for example the server and the user account might be the local admin account on that server. Some of the columns in the row are for the resource, e.g. the DNS name and Description, others like the user account and password columns are for the user account. It sounds obvious but it’s easy to forget and add a different description for each account and then find that this description was added to the resource and not to the accounts you add to the resource. Use the Notes column for adding, well notes to the account :-).
Here’s a list of the columns you want in your input file:
|Resource Name||The RESOURCE Name|
|User Account||The USER ACCOUNT name to add to a resource|
|Password||The USER ACCOUNT password|
|Description||The RESOURCE description|
|DNS Name||DNS name can be used in both USER and RESOURCE|
|Department||The RESOURCE location|
|Location||The RESOURCE Location|
|OS Type||The RESOURCE Type|
|Resource URL||The RESOURCE URL|
|Notes||The USER ACCOUNT Notes|
|ResourceGroup||The RESOURCE resource group – custom attribute used to group resources together|
The items in bold must be present for the import to work. You cant add a user account without a user account name. Again this is obvious but you will probably find, like I did that the source KeePass file has lots of entries with no account name or worse no password! You will need to add these before you can put them into PMP or delete them of course.
The import process is a little buggy and may not import all columns under certain conditions. This usually means you need to carefully check that all of the accounts were imported successfully and there is no easy mechanism for this other than doing a count. The quickest way of doing this, if possible is to group the resources into a new resource group and then the number of accounts will be listed.
Before you get to import the data you will also need to check for some common errors:
- Line Feeds in any of the cells
- Incorrect data in a cell
- Passwords stored in the wrong column
- User Account blank
Common issues are that the KeePass file comments or other columns may have line feed CR in them, i.e. Multiple rows of information with formatting in.
To find these rows select the top row and on the Data tab filter the data . Then sore the data on the Resource Name column. If any rows have multiple lines of data the row size will expand.
Look for data being in the wrong column, e.g. the notes column may contain a URL or IP address – this can be moved to the DNS or Resource URL.
Sometimes the password will also be stored in the Noted column. This should be deleted.
Where a user account is blank you must add data. Some KeePass information stores data where either the data owner knew the account name or an account name is not relevant. PMP must have an Account Name so you need to make one up if necessary. I recommend using NOTREQUIRED as the user account name to make it obvious then the account name is not relevant to the resource.
If you think you are ready then….. wait check that file again before you do this.
All the lines in the CSV file should be consistent and have the same number of fields. CSV files having extensions .txt and .csv are allowed. This is why I always add that extra column at the end ResourceGroups
On the Resources Menu select the resources tab if not already selected.
Click the “More Actions” button and select “import Resources”
Click “Choose file” and select the file to import and click “Next”
Select the column mapping and click “Finish”
Watch out this could take a long time. Once finished you will need to compare the audit log for each creation. PMP is not going to make this easy for you sadly.
If a resource already exists then PMP will not update that resource. Unless you select the check box at the bottom of the import form Overwrite the existing resources.