I have got a new toy - Nokia N800. I hope it is going to be a good successor of my old Sharp Zaurus which was my favorite PDA for last 6 years and was given to me by my former boss at Sun. My first problem with N800 was to migrate some data from Zaurus. In this article I will explain how did I move the data from the Keyring application to N800's PasswordSafe.

First you need to export the password data from Keyring into the XML file. This is simple, the only thing I would like you to think about is where are you going to place this file and do not forget to remove it once you are done. The file contains all your confidential information unencrypted. I suggest to put it on a memory card and actually do all these operations directly on the memory card. At the end, if you are paranoid enough you can erase the entire card later :)

Next thing will be to get the PWSafe tool (for any UNIX). This tool uses the same password database format as PasswordSafe. This tool has a very simple interface that allows to create the database, add/remove/list records etc. The only problem I have found with this tool is that it does not support multi-line input. For most of the fields it is not an issue, but the account notes are usually multi-line. If you apply this patch to PWSafe, it will allow you to enter multi-line strings by putting the “" (backslash) at the end.

Now you need to create the empty password database (or you can use the existing one if you want but make sure you backup it first). Do something like this:

	pwsafe --createdb -f zaurus.dat

Now you are ready to import the data from your XML file into the password database using this Perl script. If you need, you can change the location of your “pwsafe” tool by editing the value of PWSAFE_CMD variable (defaults to /usr/local/bin/pwsafe). Use the script like this:

	./keyring_to_pwsafe.pl keyring-export.xml zaurus.dat

The script will prompt you for the database password. Do not be surprised, it will produce some strange output, this is OK. I did not have time to properly hide the messages from the pwsafe program called by the script. After everything is done check the number of records in the password database. It should be the same as the number of “account” elements in your XML file. Now you can delete your export file and upload the password database to your N800 and open it with PasswordSafe.

References

  1. Maemo PasswordSafe
  2. PWSafe command-line tool
  3. Keyring for Sharp Zaurus



blog comments powered by Disqus

Published

13 February 2008

Tags