ldp 0.6

ldp, the LDAP Distributed shell-Profile has been updated to version 0.6 with a number of bug fixes (including one very embarassing one). Go get it!

LDAP on a FUSE

On OSNews is a pointer to a short tutorial entitled Develop your own filesystem with FUSE. FUSE is Filesystem in Userspace, a module with which a filesystem, probably any kind of file system, can be developed in a user space (contrary to kernel space) program. There is also a list of filesystems based on FUSE.

That got me thinking: Imagine an LDAPfuse filesystem:


$ cd /ldap
$ ls
dc=fupps,dc=com
dc=openldap,dc=org
$ cd dc=fupps,dc=com
$ cd ou=People
$ grep cn: uid=jpm
Jan-Piet Mens
$

Now, that would be cool. If only the days had more than twenty four hours and the night…

Ultimate del.icio.us Backup

I've written before about del.icio.us. It allows me to save, organize and tag bookmarks to Internet sites in such a way as that I can access them from any browser and wherever I may be located, as long as I have an Internet connection. No more remembering that I have to take a copy of my bookmarks.html (or whatever the Internet Explorer equivalent may be) along.

I've also said before that a backup of that data is a must for me, and I then presented a backup solution as a fail-safe mechanism in case del.icio.us is not reachable. That works in as much as I then have a raw XML file which I can at least use in an editor to search for something, but that isn't really a very elegant way to go about it, is it?

As far as I'm concerned, I now have the ultimate backup solution which can be used whether you use del.icio.us or Scuttle. Do note that by backup, I mean the possibility to access my del.icio.us bookmarks in the event that the site is not available or that it goes down. Not that it seems likely to happen, but one never really knows (remember the "life for free" e-mail address at Bigfoot, that suddenly wasn't so free anymore?)

The solution? Install a local copy of Scuttle and use the del.icio.us API to pull a copy of your existing bookmarks into your local copy. This can be done even if you don't want to openly host your own scuttle installation in such a way as that you'd use it in lieu of del.icio.us.

What do you need? a platform which will run a database (e.g. MySQL), a web server such as Apache, PHP and a bit of curl. Even if you don't run Linux or Unix, these components are available to you: on Windows you can easily install the wonderful XAMPP package which contains the first three prerequisites, and binaries for curl are available for a number of platforms.

After setting up scuttle ensure you've registered with your installation and make a note of your credentials (username and password). You will also need the credentials of your del.icio.us account from which we'll be retrieving the bookmarks. Whether the source is del.icio.us or scuttle doesn't matter: since scuttle uses most of the del.icio.us API, the procedure is the same; just the URL changes.

Try getting all the bookmarks from the source, replacing suser and spass by the username and password of the source service respectively.


curl --user suser:spass -O mybookmarks.xml http://del.icio.us/api/posts/all

Check the resulting output in mybookmarks.xml; it ought to contain all your bookmarks, including description and tags. Use this file to import into scuttle.

I periodically grab all bookmarks to ensure I always have the latest and greatest copy of my data, and once in a while I import them into my local scuttle. I'd like to have been able to schedule this automatically, but I haven't yet located the API with which to do that. I may at a later stage try and build one myself…

freshmeat

For those who may not know, freshmeat.net is a huge repository of announcements for Open Source (and a few proprietary) programs. The main page carries the latest announcements. The site allows me to search for projects, keep track of submissions, etc., and it also makes these available via RSS. A typical submission entry looks like this:

first freshmeat submission

What is quite interesting for software developers, and this may be new to you, is that freshmeat has an XML-RPC interface to its submission engine. A Python implementation named freshmeat-submit was written by Eric S. Raymond.

cp *.cf /Lotus/Domino/configs.nsf

As a systems integrator, designer & part-time system administrator, some of my capital lies in configuration files I have created and tweaked to get one or the other package of software up and running. Be it OpenLDAP's slapd.conf for the LDAP directory servers, Exim's exim.cf or whatever I named it, or some magic with Apache httpd.conf, these files and any scripts or programs that I developed to tweak something on the fly, are very important to me, as your configuration files are important to you as a system administrator.

Quite apart from the fact that all this stuff is of course regularly backed up to off-site tape, what I often need when I'm on the road or sitting in a hotel room, is to look at something I've previously done. No problem, you say: take a copy of the files along with you! Sure, but how often & where do I put them safely? When have they changed? How often should I rsync or scp them?

This afternoon I put together a pearl of a wee program (in Perl) which is scheduled to run nightly. Given a list of files to check (and commands to run!), it slurps up the files' content (or the command output), checks an MD5 hash to see if it has been modified, and if so, sends them off via XML-RPC to a service running on a Lotus Domino server, which drops some meta data about the file or command together with their content as attachment into a Lotus Notes database. Here they are neatly cataloged by source host, base-name and modification time.

The service on Domino is a custom made C program which uses the Lotus Notes C API to create a new document in an NSF database.

And then? Well, I simply take a replica of the database along with me! :-)

Not in Venice

Venice

Instead of flying to Venice, Italy for a short holiday, like I was scheduled to, I'm at home working. I've got quite a workload at the moment, so I suggested my family go, while I remain at home.

The Book of Postfix

I purchased and read The Book of Postfix because I'm always interested in learning something new. This certainly is one hell of a book!

I'm an Exim guy myself, and I swear by the magic that Exim lets me do with a piece of mail. Ralf Hildebrandt and Patrick Koetter have certainly done a fabulous job with their book, and they have managed to make me consider using Postfix on my next project. They concisely, clearly and very beautifully bring forward how to use Postfix in real-world situations. Clear diagrams illustrate every concept, and the book is packed full of tips & real-world configurations, including exporting users from a Microsoft Exchange server to use in a Postfix gateway.

I think the book is worth its price in chapter fifteen alone: Understanding SMTP Authentication carries the only decent documentation about Cyrus SASL I've ever had the pleasure to read. An invaluable resource for any LDAP guy as well!

All in all, a most pleasurable experience.

LDAP Distributed shell-Profile: ldp

ldp (LDAP distributed profile) will read a user-specific shell profile (.profile) from an LDAP directory server upon login, allowing users (including multiple people operating as root) to always have the same settings irrespective of which machine they are working on. ldp also operates correctly when logging in via SSH via public key auth.

Used properly, any user logging on as root to a machine, can have her customized .profile loaded upon login instead of having to "share" a ~root/.profile or similar. That for me, is the end of having to put up with colleagues who prefer emacs mode in a bash. ;-)

I've submitted an initial announcement and a release of my distributed .profile from LDAP idea to freshmeat.net. I've put up quite an extensive document about ldp on my wiki (the home of ldp); do have a look & comment on it, please.

There are still some things pending: decent man pages, an import utility and perhaps profile storage in the user's real $HOME instead of in a spool directory. Anothing thing pending is my first freshmeat submission: it is still in the queue…

In any case, even though the whole thing is rather simple, I'm quite pleased with the result of ldp. I've been testing it from a number of different machines, and my life has changed for the better! :-)