Script to query NCBS database for people via LDAP

5 views
Skip to first unread message

Dilawar Singh

unread,
Jul 14, 2014, 8:29:27 PM7/14/14
to pn...@googlegroups.com
One can easily find information about people from http://intranet.ncbs.res.in . NCBS has internal support for LDAP. Using LDAP, one can easily query information about people. This script uses this interface to NCBS's ldap-server and query for people; it can be found here:  https://raw.githubusercontent.com/PNCG/Scripts/master/ncbs-ldap.py

HOW TO USE IT

You need python-ldap package to use it. After that, using it as simple as

python ncbs-ldap.py some_word_from_the_name_of_person

Checkout how to install python packages on your operating system. On windows, you have to install pip first: you can try instructions here https://pip.pypa.io/en/latest/installing.html

Let me know if you run into trouble.

EXAMPLE USAGE:

$ python ncbs-ldap.py dilawar
.....................................
Name      : DILAWAR SINGH
Email     : dila...@ncbs.res.in
Email     : dilawar....@gmail.com
Lab       : Dr. Upinder S. Bhalla

$ python ncbs-ldap.py Upi
.....................................
Name      : Upinder Singh Bhalla
Email     : bha...@ncbs.res.in
Email     : bha...@ncbs.res.in
Lab       : Faculty

LDAP returns more information than this scripts prints. Blood group, your Mac-ID which you sent to computer section to be enabled, your joining date, and your retiring date are also returned. This is public information which can be accessed from inside the campus.

With some changes, one can integrate it with email client such as mutt. Graphics based client such as Thunderbird comes with their LDAP searching capabilities.

PS: If anybody is using mutt then one can find another version of it here. Read the header for how to integrate it with mutt-query macro.

--
Dilawar

Reply all
Reply to author
Forward
0 new messages