~:: kalyan ::~

LMC (LDAP Midnight Commander)

In my current work environment, I need to work with ldap servers for most of the time.  I have used few ldap editors to accomplish my tasks. I have used ConsoleOne heavily though. But I never found a console based ldap editor. All of them are with GUI interfaces. Which means If I am on VPN connection I am mostly not going get the application running. For any kind of small operation I need to bring up the gui. I have always liked using a command line interface for applications. For mail reading i use mutt,  for programming emacs, irc – erc, nntp – gnus, conkeror, rat poison. But I am not a cli freak, i just keep switching the applications.

After using Midnight Commander (mc) for a while, i thought this could be used as a ldap browser. I think the ldap entries can be treated like a file system like the way the ldapshell does. I have taken the 4.7.0 version of mc and started converting to a ldap editor.  I have been asked why i did not do it as a plugin to mc. I think the plugin does not fit. I am almost converting everything the way it works right now.  Its not just about browsing the ldap entries like the way mc does for iso/rpm files. It should be able to add/modify/rename/delete ldap entries. I guess this will be too tough to achieve in a plugin. So I thought I could rip of existing code apart from the interfaces it has 🙂 I wanted to name this as LMC (LDAP Midnight Commander). I could not think of  a better name.

If you have used midnight commander then learning curve will be flat for LMC I guess. I have published the code here. Right now it can  give you a list mode of ldap entries where you can browse. It can show a tree view. It has quick view mode, if you wanted to scan the attributes of entry this can be useful. It also has info mode, where it will show the operational attribute of the entry.

Apart from browsing, you can also do a search (M-?, same as midnight commander) and enter the filter in the same way  you do it in a ldapsearch command. You can rename(F6)/ delete (F8) / Copy (F5) entries. Yes! ldap entries can be copied. I am not sure there is a real use for this. But i sometime wanted to generate lot of random data, with this I could just copy a huge container to get my job done.

The regular things of midnight commander like the subshell, switching panels, adjusting panel view..will work as it is. I am still working on creating and  editing ldap entries. Most of the time it might not just work for you. I am not fixing every bug in detail. I am just trying get the very basic thing working. I have not done any release yet. May be once the add/edit is done I will release a pre-alpha. But if you find an annoying bug please report it to me, I can fix that first.

If you are looking at the code,  you might see lot of unused code which is part of mc and lot of warnings too. I am not completely ripping of the existing mc code and writing a new code for lmc. I take one section like searching (find.c, search.c) and do necessary change to get the things working. Which means there will be a lot of unused code where I have not touched yet. This helps not to loose the track of what was done there before for midnight commander. For opensuse the rpms can be downloaded from here. But this might be little outdated compared to the source.

I would like to continue to have GPL v2 license for LMC. This is my favorite pet project which I do out of my work. This looks interesting to me. But I dont expect to be interesting to you. But if you find it useful please dont forget to drop a mail.

Some of the screen shots.
quick view mode

From lmc

Connect dialog

From lmc

List mode view

From lmc

search mode

From lmc

1 Comment »

  1. […] only found this so far: https://skalyanasundaram.wordpress.com/lmc/ but it looks half done and abandoned. (So that’s obviously not a viable […]

    Pingback by Console based GUI for LDAP Administration (For Linux) [on hold] | DL-UAT — March 29, 2015 @ 2:19 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: