Sunday, October 4, 2009

Openfire Admin Login

How to change Openfire's admin login when using Windows Vista and an embedded database:
  1. Shut down Openfire
  2. As the Windows Administrator,

    C:\Program Files (x86)\Openfire\embedded-db\openfire.script

  3. Change the line that looks something like this

    INSERT INTO OFUSER VALUES('admin',NULL,'<hex string>', 'Administrator','admin','0','0')


    INSERT INTO OFUSER VALUES('admin','<new password>',NULL, 'Administrator','admin','0','0')

  4. Save the file, exit the editor
  5. Restart Openfire
Here are the same instructions in a more annoying format:

Maybe this is just me but...well...I'd actually rather not deal with that alternative so I'm assuming that this is Openfire's problem problem and not mine.

OK, so for the upteenth time*, I lost the admin password on my Openfire installation.  Openfire is like the most user friendly XMPP server out there...that I know of...and I know of like 2 others so this one must be really, like, user friendly.  Anyhow, so I lost my admin login...again...and I tried to figure out how I could change that password without having to reinstall Openfire.

This applies to the Windows installation with an embedded database.  If you are using a real operating system and a real database, you probably don't have this problem.  If you do then it's because of you...not me.**

At any rate, if you're really unfortunate (read, me), then you are running on the the very interesting and very secure operating system that is Microsoft Vista.  In that case, you may find that Openfire is squatting in the following directory:

C:\Program Files (x86)\Openfire

Yes, it uses that font rather than courier.  Really.

What's more, the embedded database lives in

C:\Program Files (x86)\Openfire\embedded-db

Note that Vista took out the blank in just about everywhere except for the programs directory.

This makes it more secure.

I mean, why else would they have done it?

At this point, a stand-up comic would make an observation about how they recently had a child and wait politely for the audience to applaud.  The idea is to get the audience on your side by a) pointing out that you recently had a child and b) that you have been without sleep and c) are running Microsoft Vista and d) are on the edge and e) that not applauding could very well push you over the edge and f) whatever.

Now then, the embedded database does everything in memory except that it loads everything at startup.  Actually, I'm not sure if that's what it does at all, but it looks that way; and, since I'm the sort of person who forgets their admin login at the drop of a hat, I'm obviously the sort of person that you should listen to.***

The file


Has the various logins and passwords for the system.  In a bold move to ensure security, the passwords are encrypted.  Or rather, there is a field for the users table that contains a field called "encryptedpassword."  There is another password called "plainpassword."  Except both fields do not contain a period in the name.  I hate punctuation.

Now I know what you're thinking: "HA HA!  I shall just change the field that says 'email' to the new password and then the system shall let me in!"  This is why I make $300 an hour and you don't.****

What you actually need to do is change the "plainpassword" to the new password, and then change the "encryptedpassword" to "NULL!"******.

Except it doesn't work.

This is because the very interesting and extremely secure operating system, Windows Vista, will not let you save the file to that directory!  Instead you have to use the extremely secure step of editing the file as the administrator.

OK, so you do all the above and it still doesn't work.   At this point, if you are like me, you are saying Why is this clown using italics so much******* In addition you would not******** think to edit this file after shutting down Openfire, since that program rewrites the startup file every time it shuts down.

And then, only then, after all this enjoyable fun, would you be able to log onto Openfire.

* = which is, by the way, not because of me.
** = this has been verified by  Which is affiliated with me.  So therefore it's probably not objective.
*** = if you believe this and have a lot of money to waste on consultants, please contact me.
**** = if you believe or even if you don't, but you are willing to pay this amount for at least a year and you don't expect to get anything useful out of it, please contact me.*****
***** = P.S. to the previous note, you are also required to actually have that much money and be willing to give it to me in advance before contacting me.
****** = except that you leave off the exclamation point.  See, there really is a reason to pay me lots of money.
******* = except you were probably able to spell "italics" correctly on the first try.  Teacher's pet.
******** = see points above about giving me lots of money.
********* = does anyone else actually read footnotes?

Sunday, June 28, 2009


I posted some ideas for a new CLIPC feature that I am currently calling "shared memory FIFOs". For those who are interested, please take a look at the posting on the SourceForge site and post any thoughts, concerns, etc.

The link is:

(Note: this link previously pointed to a page that asked you for a password. It has been updated so that it no longer does that.)

Wednesday, June 17, 2009

New CLIPC Site

I am gradually going to be moving all things CLIPC to the SourceForge site. In particular I am hoping to create some basic documentation on how to use CLIPC and its various components to the blog associated with that project.

The CLIPC site is at
The CLIPC blog is at

Monday, June 15, 2009

CLIPC 0.2 up on SourceForge

The new and improved version of CLIPC is now available on SourceForge. This new version includes, among other things, non-blocking FIFOs.

Saturday, May 9, 2009

Xming Locks!

Short Story

Starting up the gnome session manager from within a gnome-terminal avoids the annoying "Not Responding" problem that I get when going from Vista to Linux via XMing.

Long Story

Briefly, here is what I did to get it to work:


This is using XMing to display something from Fedora Core 10 ( on Vista Home Permium.

For reasons unknown (anyone here with info, please comment), XMing seems to lock up on Vista frequently. After as little as 10 seconds, the main window stops responding to requests.

I would set up XMing using the configuration that I outlined in a previous post.

Xming after a few seconds

Start Xming without access control

I'm not exactly fond of this, but unfortunately I did not find a way around this. If I do, I will post this info in a followup.

XLaunch dialog

This results in the rather...blank Xming display:

Blank and not very useful

SSH to the Linux system and set DISPLAY

Using putty or whatever, log onto the Linux system. Note that this is using SSH, telnet, but not with something graphical like an xterm.

Next set the X-Windows environment variable, DISPLAY, to point back to the Vista system. I'm sure there's some way of doing this with a script, but I'm too lazy to figure it out.

Setup the DISPLAY variable

Start a gnome-terminal

I expect that xterm or kdeterm or others would do just as well, but my system only seems to have "gnome-terminal." This should result in an unadorned, ugly, terminal appearing on the Vista system:

Note the lack of border and resize.

From within the gnome-terminal, start a gnome-session

Emphasis on from within the gnome-terminal! I've tried doing this from the SSH session and it does not seem to work. Don't ask me why... it's just Linux!

Once again, perhaps this may work using the KDE equivalent, but this is what I use.

After starting up a session, the Xming display changes from the ugly default to something better looking:

Note the window now has a window bar, border and the background has changed.

gnome-session also spouts about a page and a half of scary-looking gibberish. The thing seems to work despite all this.


Using this approach, Xming is much more responsive than with the other approaches I've tried. It is somewhat cryptic, and various steps may not even be necessary. If you find other approaches that work, please post them.

Wednesday, April 29, 2009

JNI/Windows Gotchas: UnsatisfiedLinkError

The Short Story

This post describes a solution that has worked for me when I get a an UnsatisfiedLinkError on Windows using MingW, while developing a JNI library.

The Long Story

Java Native Interface (JNI) development on Windows is extremely annoying. There are all kinds of land mines strewn randomly about the landscape to snare the wary and unwary alike. Any one of these issues can require hours of hair-tearing in order to get things to a working state.

After dealing with enough of these, I decided to post some of the solutions I've found in order to save others from premature baldness. For today's entertainment, I have selected the infameous UnsatisfiedLinkError.

java.lang.UnsatisfiedLinkError: no found in java.library.path

This is caused by not having the DLL that contains your C/C++ code in the path that Java is using to find it. If you have this problem, try this:

Bring up the properties for the project containing the native declarations

For example:

For the CLIPC project, this is clipc-java. You can be sure by selecting the Java project that contains the .java files with declarations like this one:

From the properties dialog, bring up the build path for the project.

For example:

From the build path properties, edit the native libraries location for the project

For example:

From the resulting dialog, select the folder where your DLLs live

For example, this tells Eclipse to look in the workspace:

Then this tells Eclipse where to look for the DLL:


If you have an UnsatisfiedLinkError, you may need to tell Eclipse where your DLLs live. This post gives a step-by-step on how to do that.

Saturday, April 25, 2009

XMing Rocks (yes, it does)!

The gnome windows manager desktop on Fedora 10

Short Story

If you need to develop on Windows and Linux, XMing will allow you to run programs on a Linux box and display them on a Windows machine.

Long Story

As the chief architect, engineer, and only developer on the CLIPC project, I need to be able to develop on Linux and Windows. Developing on Linux has been something of a chore up until now, because I had to either "rlogin" onto the machine, and give up any GUI capabilities, or physically sit in front of the system.


I've been trying to get a better setup for a couple of days and then I hit on the idea of using the ability of X-Windows to forward a display to another machine. One of the (many) problems that I encountered was getting an X-Windows server to actually run on Windows.

At first I tried to use Cygwin-X, the x-windows that comes with Cygwin, but I found it difficult to use. Any time I run a program and it seems to do nothing, I start getting testy. Specifically, I selected

 Start>Cyginw-X>Start XWin Server

After a bit of puttering about, I recalled running "startx" from the keyboard. I tried that from a Cygwin session and was "rewarded" with this:

Ugh...this actually makes Windows look good!

At this, I felt like I had been thrown into a time warp back to the 90's when you could peg the CPU of a machine running X by just bringing up a menu.

Mind you, I have tremendous respect and gratitude towards the folks who maintain cygwin. But there are limits.

Enter XMing

After glaring at Cygwin-X for a bit, I tried looking for something else. Google, after much prodding and use of something-or-other: directives turned up XMing.

I've been using MinGW for quite a while in general, and for the Windows portion of CLIPC in particular, so I am reasonably comfortable with things MING. I downloaded it and installed it in under 10min. Perhaps under 5min.

With most things Linux-like I expect stuff to take at least a weekend, so this was a very nice surprise.

At first I got the same, ugly X-Windows starting stuff, but with a little bit of reading, I determined how to fire up the gnome window manager. The way to do this is to specify "gnome-terminal" as the "start program" that you get from running XLaunch.

In the interest of being more helpful, here is what I used for the values in the XLaunch config screens:

For me the most important aspect is that it can run Eclipse. I want to have some vague confidence that my stuff will compile and run on the Linux version.

Eclipse running on Linux and forwarded to Windows


MingX is a user-friendly solution for those who want to forward X-Windows from a Linux box to a Windows box.