While playing around with getting host entries to work with ldap, I found that my previous code for using gethostbyname was not running clean on puias6. Here is an updated version

<br />
#include <stdio.h><br />
#include <netdb.h><br />
#include <stdlib.h><br />
#include <sys/socket.h><br />
#include <netinet/in.h><br />
#include <arpa/inet.h></p>
<p>int main(int argc, char **argv) {<br />
	int i;


We store our host information in ldap. Previously using ldap for host lookups was done by adding the appropriate entries to /etc/ldap.conf and changing nsswitch.conf.

With 6, nss_ldap has been replaced by nslcd, so I needed to change our setup a little.
I put the following into nslcd.conf


uid nslcd
gid ldap
uri ldap://ldap2.example.com


A friend of mine was talking about his design for a shell that would allow you to programatically reuse arguments. I started looking and found that bash can do this but not programatically (at least as far as I know). The syntax was slighty confusing but here is the summary, it blew my mind when I started using it (but I'll probably forget it again soon enough, like all the awesome things you can do in vi if you can remember...)

Here goes, lets copy a file from a deeply nested path to our location by first tab-completing the filename with ls


After upgrading to horde 4.0.8 and imp 5.0.9 a few users had issues reading email. There were some messages missing, or for some users no messages at all.

There's probably an easier way to do this, but I just put this in my aliases and it works well enough.
alias fl='(for file in `find .??* * -maxdepth 0 -type d`; do du -hs $file 2>/dev/null; done) |sort -h -k 1'

One of our ldap seconaries was failing to stay in sync with the main server. We kept getting "Consumer failed to replay change" in the error log. The uniqueid and CSN were always the same, so at first I thought it was specific to the record that was being propogated.

After putting cyanogen on my nookcolor, I wanted to try out a bluetooth keyboard. I borrowed an Apple keyboard from a friend and started playing. Initially I paired and it looked like it was going to work right out of the box but...

I had a user come to me saying they couldn't forward X11 from their home institution to us. I watched them logged in and noticed that xauth was complaining it couldn't lock files. I looked a little deeper and it was that xauth creates a temporary file, then hardlinks to .Xauthority. The problem is that this remote system uses CIFS for home directories (weird huh?).

I have a system with megaraid and I needed to add a new logical drive. I wanted to do it without rebooting, so I started looking around. I got the MegaCLI from LSI's website and was dismayed by it's apparent lack of documentation.

After installing certificates on the directory server and enabling ssl, the admin server wouldn't allow us to access certificates. After clicking on "Manage Certificates" on the Tasks tab, we'd get this error: