Tuesday, 13 April 2010

Recovering from a lost password with IBM Portal 6.1.5

I tried installing IBM Portal on openSUSE 11.2 recently. Just created a virtual machine with VMWare player on my ubuntu karmic 9.10 x64 laptop and installed openSUSE from a downloaded ISO.
I could not install using the GUI so I used:
./install.sh -console
instead and the installation went without any issues - or so I thought.

Strangely, I was not able to login with the portal adminstrator username and password - even though I was very careful with the admin password.

I thought that maybe I got it wrong, but I reinstalled again and had exactly the same issue.

I remembered that the default Portal installation uses the WIMFileBasedRealm as a user repository. This is basically a set of XML files that define users and groups.

So I hacked myself into the portal simply by following these steps:

1. Use the "sign up" option and create a new user.
2. Ensure that you can log into the system with that user.
3. Logout
4. Locate the fileRegistry.xml file in the folder /config/cells/{your_cell}
5. Edit the file and locate the
6. In this section you will find tag
7. In this tage will be the uniqueName specified for the group members
8. Add yourself to this tag by copying an existing entry:

9. Change the uid to your new uid
10. shut down the server by killing off the java process
11. Restart the server, log in again and then change the wpadmin password using Portal admin tools.

There are other ways to decode the password in the "" tag but I found the aforementioned method much simpler.

Friday, 9 April 2010

Generating a DTD from an XML file in ubuntu karmic x64

If you do an internet search for anything that will generate a DTD from an XML file, you will get a whole raft of different editors and utilities.

The most interesting thing is that if you have ubuntu then you probably already have a command line utility that will do the same:

mkdtdskel inputfile > outputfile

I imagine this stands for "make a DTD skeleton".

Amazingly you DON'T get a reference anywhere in the internet search engine for this utility! Strange because it is extremely fast and already installed with the distro.

If you need to do this type of thing try out out.