<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7619661</id><updated>2011-08-12T01:10:09.944-04:00</updated><title type='text'>eldapo</title><subtitle type='html'>a directory manager's blog</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://eldapo.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>71</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7619661.post-2417842440912081017</id><published>2007-09-12T22:21:00.001-04:00</published><updated>2008-11-30T20:28:41.708-05:00</updated><title type='text'>Eldapo Has Moved!</title><content type='html'>Alhough this site will stay up for awhile, I won't be making any new posts here.&lt;br /&gt;&lt;br /&gt;For the latest from "Eldapo" you'll need to go to&lt;br /&gt;&lt;br /&gt;&lt;a href="http://eldapo.lembobrothers.com"&gt;&lt;strong&gt;eldapo.lembobrothers.com&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;which is a new subdomain of mine set up on a shared host.&lt;br /&gt;&lt;br /&gt;I'm still going through all the articles I recently exported from here to that new site, laboriously fixing the formatting of the substantial chunks of source code that are the real treasure this site has to offer, but after completing the conversion of another site this weekend I've decided that there's no time like the present to pick up and continue the work started here over there.&lt;br /&gt;&lt;br /&gt;Hope you'll visit soon, and that the content made available there is useful to you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-2417842440912081017?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/2417842440912081017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/2417842440912081017'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/09/eldapo-has-moved.html' title='Eldapo Has Moved!'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-4062245579154800320</id><published>2007-09-09T18:45:00.000-04:00</published><updated>2007-09-12T22:21:41.640-04:00</updated><title type='text'>from blogger to wordpress</title><content type='html'>Today was the day I decided to import this blog from &lt;a href="http://www.blogger.com"&gt;Blogger&lt;/a&gt; into a copy of &lt;a href="http://wordpress.org"&gt;WordPress&lt;/a&gt; I have running on my new personal site, under the URL &lt;a href="http://eldapo.lembobrothers.com"&gt;eldapo.lembobrothers.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;While the import itself went smoothly (thanks to a slight hack to the blogger.php file under wp-admin/import (an instance of www2.blogger.com needed to be changed to www.blogger.com), after looking over the formatting of my articles I was disappointed to see that almost every section of text wrapped in the &amp;lt;code&amp;gt and &amp;lt;pre&amp;gt tags had been seriously screwed up. Some of the problem was due to the new application trying to be "helpful", completing tags before the code block was, well, &lt;em&gt;complete&lt;/em&gt;. It also seemed to have a great deal of trouble getting linebreaks right. Given that &lt;a href="http://edapo.blogspot.com"&gt;eldapo.blogspot.com&lt;/a&gt; goes back around 3 years, with a total of 69 mostly code heavy pieces, this means that I’m going to have to go in a reformat almost every article by hand.&lt;br /&gt;&lt;br /&gt;Now the thing is, that rendering big chunks of source code in &lt;a href="http://www.blogger.com"&gt;Blogger&lt;/a&gt; was never a picnic. In fact, it's been downright aggravating. Unfortunately, it doesn’t look like &lt;a href="http://wordpress.org"&gt;WordPress&lt;/a&gt; is going to be any easier. In fact, I’ve already experienced some of WP’s own eccentricities in this regard and I’m not pleased. There's something to be said for handcoding your own HTLM pages (sorry, I meant to say "XHTML").&lt;br /&gt;&lt;br /&gt;Oh joy. Just what I needed. So much for easier, faster, better.&lt;br /&gt;&lt;br /&gt;All applications suck. Blogging applications suck most.&lt;br /&gt;&lt;br /&gt;(and my current theme in WP does full justification, and a really crummy job of it to boot -- kind of like WordStar for CP/M or IBM DisplayWrite on an old XT clone with a Hercules graphics card ... yuck!)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-4062245579154800320?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4062245579154800320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4062245579154800320'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/09/from-blogger-to-wordpress.html' title='from blogger to wordpress'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-1425265291935260103</id><published>2007-09-04T09:46:00.000-04:00</published><updated>2007-09-06T20:49:14.771-04:00</updated><title type='text'>openldap with an old-style root dn (o=example,c=US)</title><content type='html'>I needed to do this during testing of an OpenLDAP proxy, and since examples were so difficult to find, thought I'd post it here.&lt;br /&gt;&lt;br /&gt;To make this work your slapd.conf must have an include line for the core.schema (in addition to any others you might need for user entries, like cosine, inetorgperson and nis schemas).&lt;br /&gt;&lt;br /&gt;In slapd.conf, under your database line (e.g. database dbd), you need to put a suffix directive like:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;database     dbd&lt;br /&gt;suffix       "o=Example,c=US"&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;Then when you create your db load file for slapadd to create the database, make sure you include your root dn at the top:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;dn: o=Example,c=US&lt;br /&gt;objectclass: top&lt;br /&gt;objectclass: organization&lt;br /&gt;o: Example&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;Notice that there is no 'c' attribute or value in the body of the entry. Under the "standard" organization schema (contained in core.schema) countryName or 'c' is not an allowed attribute. The attribute &lt;em&gt;may&lt;/em&gt; be used in a distinguished name, however. DN values are not subject to the schema in the same ways as other attributes within an entry.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-1425265291935260103?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/1425265291935260103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/1425265291935260103'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/09/openldap-with-old-style-root-dn.html' title='openldap with an old-style root dn (o=example,c=US)'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-2570967693284315280</id><published>2007-09-04T08:44:00.001-04:00</published><updated>2007-09-06T20:41:32.699-04:00</updated><title type='text'>openldap as a metadirectory</title><content type='html'>Now that I've got some experience using the OpenLDAP proxy backend, I've moved on to sttuggling with getting the meta backend ("slapd-meta" or "back-meta", the former how it's looked up in the man pages, the latter how it's referred to in the doc and on the mail lists).&lt;br /&gt;&lt;br /&gt;The doc is really sparse on this. Actually, it doesn't really address it at all. The man pages are, well, man pages. So this is going to be a real "adventure". There's not much on the lists either, for the most part pleas for concrete examples are met with "what are you trying to do" or "why would you want to do that" from various quarters.&lt;br /&gt;&lt;br /&gt;Very interesting.&lt;br /&gt;&lt;br /&gt;Anyway, I've started off by building my own custom OpenLDAP server from the latest stable source. Here's my configure syntax:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;./configure --prefix=/opt/openldap/meta \&lt;br /&gt;--enable-ldap \&lt;br /&gt;--enable-meta \&lt;br /&gt;--enable-sql \&lt;br /&gt;--enable-rewrite \&lt;br /&gt;--enable-rwm&lt;br /&gt;--enable-proxycache \&lt;br /&gt;--enable-glue \&lt;br /&gt;--enable-unique \&lt;br /&gt;--enable-refint \&lt;br /&gt;--enable-dynlist&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;In the list above only ldap, meta and rewrite should be essential. After some initial experimentation, I found that my efforts to merge together two or more directory trees were only successful after I compiled in the glue overlay.&lt;br /&gt;&lt;br /&gt;If you look at my description below of where I'm going with this, I think it will become obvious why I'm including the other modules/overlays listed (except for rwm, that overlay is supposed to replace rewrite in future, so I want to try it out now).&lt;br /&gt;&lt;br /&gt;I'm also going to try some different config variations from the slapd-meta man page, which so far hasn't gone so well.&lt;br /&gt;&lt;br /&gt;Before I start in earnest though, let me set out what &lt;em&gt;I'm&lt;/em&gt; looking for.&lt;br /&gt;&lt;br /&gt;One of the big problems that all directory admins have to deal with is the insane amount of data importing, conversion and outright munging necessary to maintain a centralized directory service that's going to be of any use by anyone. While proxying and caching results can help, the most vexing issue remains how to most efficiently consolidate needed information into the directory.&lt;br /&gt;&lt;br /&gt;There are other, rather simple, solutions to this dilema. The one most recommended in the early years of LDAP was to use the referral feature to have queries get redirected to another directory that would have the data the inquirer was looking for. Of course, if data were spread out over several different directories (or relational databases with LDAP listeners), that would force an application to make multiple queries and consoliate the information for itself.&lt;br /&gt;&lt;br /&gt;What really is needed is a consolidated "view" of multiple sources of data into a single LDAP directory record for a user, all nicely massaged and normalized for use by any application that needs it. That's why I've also compiled in support for the sql backend (an ODBC manager and it's source, like unixODBC and unixODBC-devel are required to compile), proxycache, attribute uniqueness, referential integrity and dynamic groups.&lt;br /&gt;&lt;br /&gt;This is my quest. To follow that star. No matter how hopeless. No matter how far.&lt;br /&gt;&lt;br /&gt;I hope along the way we'll all learn a few things we can actually use "back at the shop", as my Dad used to say.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-2570967693284315280?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/2570967693284315280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/2570967693284315280'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/09/openldap-as-metadirectory.html' title='openldap as a metadirectory'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-6401539083729268679</id><published>2007-09-01T13:43:00.000-04:00</published><updated>2007-09-06T20:50:01.351-04:00</updated><title type='text'>What ever happened to x.500? Or, can we get real for a second about "standards"?</title><content type='html'>The ubiquitous "dc=example,dc=com" root context hasn't always been the "standard" for LDAP directories. In the beginning (1987), influenced by the .x500 standard, most directories used something like "o=example,c=US" for their directory root. Those were different times, when it looked like networks, the Internet most of all, was going to be big, global, and most of all corporate.&lt;br /&gt;&lt;br /&gt;A funny thing happened on the way to the millenium though. As the developers of LDAP had predicted, x.500 and the DAP (Directory Access Protocol) that accompanied it, were too inflexible, too complex, for even the largest companies to cost-justify implementation. The dream of an interconnected, fully interoperable, world-wide directory passed into history. What we were left with was the simpler, more nimble and still barely structured LDAP (Lightweight DAP) protocol and servers to provide standalone directory services for organizations and individuals, first from the University of Michigan team that invented the protocol, and then Netscape and others after these developers moved out into the commercial market.&lt;br /&gt;&lt;br /&gt;The "dc=example,dc=com" root dn format, where the "dc" is short for "domainComponent", is only the most visible sign of this shift to a different approach to directory services.&lt;br /&gt;&lt;br /&gt;There are many systems that still default to the old x.500 root dn, most notably IBM's Lotus Domino product. This should be a tip-off that things might not work exactly like other directory products that sport the "dc-example,d=com" format. And they don't. This isn't always a good litmus test though. Microsoft has used the new format in it's Active Directory product from the beginning, but AD very definitely has some un-LDAP like qualities that become painfully apparent very soon after you begin working with it.&lt;br /&gt;&lt;br /&gt;As they are wont to do, commercial vendors often equate the Internet standard LDAP v3 protocol with it's implementation by one or more vendors. An application written to interface with Lotus Domino may claim to be "LDAP compliant" but in reality it's interoperability with other LDAP servers may be less than seamless. Another may claim "LDAP compatibility" and then give you a choice between Microsoft Active Directory and Sun (often "iPlanet") Directory.&lt;br /&gt;&lt;br /&gt;A close look at their code will usually reveal a custom interface for each directory. The MS interface using (or, inexcusably not using) Simple Paged Results Control to page results from deep searches that would otherwise get truncated or fail because of AD's aggressive limits on search results (default 200 entries, &lt;strong&gt;hard&lt;/strong&gt; of 2,000). The Sun interface might instead use Sun's proprietary Virtual List View (again, or not) to achieve the same result. Sometimes you see really stupid, embarressingly stupid, parameters hardcoded in like requiring a single dn for person entries and only providing a level 1 search (one level down from the base given, so searches won't recurse down into subcontainers) -- making the product useless where your DIT (Directory Information Tree) either nests user entries several levels down, or spreads them out several branches across.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-6401539083729268679?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6401539083729268679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6401539083729268679'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/09/what-ever-happened-to-x500-or-can-we.html' title='What ever happened to x.500? Or, can we get real for a second about &quot;standards&quot;?'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-6824029299536044957</id><published>2007-09-01T13:19:00.000-04:00</published><updated>2007-09-05T12:01:25.953-04:00</updated><title type='text'>second openldap directory on the same server</title><content type='html'>If you don't need a second, distinct slapd process (e.g. no need for the directory to run on a different port, listen on a different interface, or use a separate logfile) this actually pretty easy. All you have to do is add another "database" line and define a different suffix than any of the database definitions that came before.&lt;br /&gt;&lt;br /&gt;So, if your first database was defined as:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;database     dbd&lt;br /&gt;suffix       "dc=example,dc=com"&lt;br /&gt;rootdn       "cn=Manager,dc=example,dc=com"&lt;br /&gt;rootpw       secret&lt;br /&gt;directory    /var/lib/ldap&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;... with whatever indexing and other command you've got, the next database would be defined with,&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;database     dbd&lt;br /&gt;suffix       "dc=sample,dc=org"&lt;br /&gt;rootdn       "cn=Manager,dc=sample,dc=org"&lt;br /&gt;rootpw       secret&lt;br /&gt;directory    /var/lib/ldap2&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;That's all there is to it. You'll connect to this new db using the same port as your other db, but with a different context. So instead of&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;ldapsearch -x -LLL -b "dc=example,dc=com" -s sub "objectclass=*"&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;you'd use&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;ldapsearch -x -LLL -b "dc=sample,dc=org" -s sub "objectclass=*"&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;Keep in mind that when initializing the new db, you need to specify it's context as one of the parameters for slapadd&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;slapadd -s /etc/openldap/slapd.conf -b "dc=sample,dc=org" -l sample.ldif&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;Your new db files will get created in /var/lib/ldap2, or whatever directory you specified within your new database definition.&lt;br /&gt; &lt;br /&gt;Don't forget that you must specify indexes, time and size limits for each database defined, even if these will be the same as those already set for previous databases.&lt;br /&gt;&lt;br /&gt;Also, when you combine two or more databases in the same slapd.conf, operations from both will get logged together. If you want separate logs you'll need to set up a second slapd.conf and invoke slapd a second time with this new slapd.conf as the config file. Something like this:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;slapd -n slapd2 -l LOCAL6 -f /etc/openldap/slapd2.conf -h \&lt;br /&gt;ldap:///:10389 -u ldap -g ldap&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;In the above line I've set a different syslog facility for my log (and defined it in syslog.conf to write to a different log file than my main slapd, which is running on LOCAL4), I'm also starting it up on a different port (10389).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-6824029299536044957?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6824029299536044957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6824029299536044957'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/09/creating-second-openldap-db-context.html' title='second openldap directory on the same server'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-9184445966594522794</id><published>2007-08-29T00:57:00.000-04:00</published><updated>2007-08-30T13:08:51.416-04:00</updated><title type='text'>Configuring RedHat OpenLDAP for Logging</title><content type='html'>Out of the box, RedHat's build of the openldap server doesn't provide for a separate log file to track operations performed on the directory. This is easy enough to set up with a couple of config file changes.&lt;br /&gt;&lt;br /&gt;First, edit /etc/openldap/slapd.conf and put the following line &lt;em&gt;above&lt;/em&gt; where the database definitions go ("# ldbm and/or bdb database definitions"):&lt;br /&gt;&lt;code&gt;&lt;br /&gt;loglevel 256&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This will enable logging at a level that will give an adequate amount of detail for tracking and troubleshooting.&lt;br /&gt;&lt;br /&gt;Next, edit /etc/syslog.conf to add the following line:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;local4.*               /var/log/ldap.log&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;This tells syslog to redirect all messages from the LOCAL4 logging facility to a file  called /var/log/ldap.log, slapd being configured by default to send logging information to LOCAL4.&lt;br /&gt;&lt;br /&gt;Restart syslog, then slapd (RedHat calls the service  "ldap") using /sbin/service and you should see the following in your new ldap.log:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;Aug 27 23:36:44 myhost slapd[11929]: @(#) $OpenLDAP: slapd 2.3.30 (Apr 25 2007 04:35:50) $      brewbuilder@hs20-bc2-3.build.redhat.com:/builddir/build/BUILD/openldap-2.3.30/openldap-2.3.30/build-servers/servers/slapd&lt;br /&gt;Aug 27 23:36:44 myhost slapd[11930]: slapd starting&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;If you've installed your own build of OpenLDAP, or willing to hack the shipping init script, /etc/init.d/ldap, you can use the "-l" switch to specify a different syslog logging facility (LOCAL0 through LOCAL7, or USER or DAEMON).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-9184445966594522794?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/9184445966594522794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/9184445966594522794'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/08/configuring-redhat-openldap-for-logging.html' title='Configuring RedHat OpenLDAP for Logging'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-5573041555326498402</id><published>2007-08-29T00:23:00.000-04:00</published><updated>2007-08-31T15:52:28.423-04:00</updated><title type='text'>openldap as a pass-through proxy</title><content type='html'>First, you need to download the latest stable source from the &lt;a href="http://www.openldap.org"&gt;OpenLDAP&lt;/a&gt; Project. As of this writing that is v2.3.32.&lt;br /&gt;&lt;br /&gt;Next do a tar xzf to unarchive the source into a directory for building (I usually use /var/tmp).&lt;br /&gt;&lt;br /&gt;For a simple LDAP proxy that can also do dn mapping, use the following configure command:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;./configure --prefix=/opt/openldap/proxy --enable-ldap --enable-rewrite&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The path specified in "--prefix" can be anything you like, but keep in mind that you probably don't want to step on any existing openldap binaries installed on your distribution, so it's a good idea to segregate it in its own directory. As for almost all 3rd party software, my practice is to install to /opt.&lt;br /&gt;&lt;br /&gt;Then do a "make depend", "make", and su-ing to root, a "make install".&lt;br /&gt;&lt;br /&gt;Once that is done (which on a recent RedHat family system should complete without any errors), you should change ownership of the new program directory (/opt/openldap/proxy) to the system ldap group and user ("chown -R ldap:ldap /opt/openldap/proxy). For convenience, you should also make everything readable and writable by members of the ldap group ("chmod -R g+rw /opt/openldap/proxy").&lt;br /&gt;&lt;br /&gt;My initial slapd.conf to launch an LDAP proxy was pretty simple. Here's the text:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;#&lt;br /&gt;# See slapd.conf(5) for details on configuration options.&lt;br /&gt;# This file should NOT be world readable.&lt;br /&gt;#&lt;br /&gt;include  /opt/openldap/proxy/etc/openldap/schema/core.schema&lt;br /&gt;include  /opt/openldap/proxy/etc/openldap/schema/cosine.schema&lt;br /&gt;include  /opt/openldap/proxy/etc/openldap/schema/inetorgperson.schema&lt;br /&gt;&lt;br /&gt;pidfile  /opt/openldap/proxy/var/run/slapd.pid&lt;br /&gt;argsfile /opt/openldap/proxy/var/run/slapd.args&lt;br /&gt;&lt;br /&gt;access to dn.base="" by * read&lt;br /&gt;access to dn.base="cn=Subschema" by * read&lt;br /&gt;access to *&lt;br /&gt; by self write&lt;br /&gt; by users read&lt;br /&gt; by anonymous auth&lt;br /&gt;&lt;br /&gt;loglevel   256&lt;br /&gt;&lt;br /&gt;######################################################&lt;br /&gt;# database definitions&lt;br /&gt;######################################################&lt;br /&gt;&lt;br /&gt;database ldap&lt;br /&gt;suffix  "dc=mydomain,dc=com"&lt;br /&gt;uri  "ldap://ldap.mydomain.com"&lt;br /&gt;acl-bind bindmethod=simple binddn="cn=proxy,ou=special users,\&lt;br /&gt;dc=mydomain,dc=com" credentials=secret&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;The important thing to note is that the "database" enabled is "ldap", the proxy back-end. The uri is that of the LDAP server I'm proxing to. The acl-bind directive enables authentication to the target LDAP server for the purpose of applying any access controls in effect there. Without this all binds from the proxy would be as anonymous.&lt;br /&gt;&lt;br /&gt;Actually starting up this new slapd can be done with the following syntax:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;/opt/openldap/proxy/libexec/slapd -4 -h ldap://myhost.mydomain.com:1389 \&lt;br /&gt;-n slapd-ldap -u ldap -g ldap&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;The slapd executable is the one we built from source and installed to "/opt". The "-4" directive tells slapd to listen for IP v4 clients only. The "-h" directive specifies the uri of the proxy server. In this case I've given a DNS name, but you could just as easily specify an IP address. You must specify the listening port, or it will use standard LDAP port 389. "-n" lets you name the new slapd process so it can be easily differentiated from any others running on the same box. The "-u" and "-g" specify the system user and group to run the server as.&lt;br /&gt;&lt;br /&gt;P.S. If you're having trouble getting slapd to come up, use the "-d" option with some value (I usually just use "1") to get debugging info echoed to the console -- keep in mind that this will cause slapd &lt;em&gt;not&lt;/em&gt; to fork and it will only stay up only so long as the console you invoked it in is up. In addition, you can actually log via syslog by specifying "-l LOCAL6" or another logging facility on the command line, and defining the log path in /etc/syslog.conf (be sure to reload syslog with the new config info).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-5573041555326498402?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/5573041555326498402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/5573041555326498402'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/08/openldap-as-pass-through-proxy.html' title='openldap as a pass-through proxy'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-4781538957577987034</id><published>2007-08-29T00:11:00.001-04:00</published><updated>2007-08-30T11:31:22.765-04:00</updated><title type='text'>openldap proxy and beyond</title><content type='html'>Finally made the time to compile a fresh build of the latest stable openldap (v2.3.32) with the "ldap" backend enabled and configured as a simple pass-through proxy. This was just the beginning of course, because I then did a "make clean" in my build directory and enabled both the "ldap" &lt;em&gt;and&lt;/em&gt; "meta" backends, using a different prefix parameter to put the finished product in a different directory (in my case proxy went into /opt/openldap/proxy and meta to /opt/openldap/meta).&lt;br /&gt;&lt;br /&gt;What I'm hoping to do with meta is create a "virtual directory" from a couple of different vendor directories. My first try will be with a Fedora Directory and an Active Directory. The idea will be to create a view of selected entries from each of these directories under a single "virtual" DIT (Directory Information Tree) that resides on the metadirectory. This will require some fancy dn mapping, as well as some attribute and attribute value transforms, all of which meta is supposed to be able to do.&lt;br /&gt;&lt;br /&gt;I've had mixed success with other LDAP proxy products, and spent a hellish first quarter in 2001 struggling with getting iPlanet Meta-Directory to do &lt;em&gt;anything&lt;/em&gt; better than a collection of scripts I wrote myself (I finally got my company to dump Meta-Directory, after receiving lackluster support from iPlanet, and then Sun). Later that year I was at a marketing event where Hal Stern from Sun spoke. When he got to the subject of Meta-Directory, he looked over at me and said, "... or, you could just write your own scripts...". Vindication.&lt;br /&gt;&lt;br /&gt;This should prove to be instructive, and may even be useful for at least one project at work.&lt;br /&gt;&lt;br /&gt;I'll provide details of my configurations as testing proceeds.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-4781538957577987034?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4781538957577987034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4781538957577987034'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/08/openldap-proxy-and-beyond.html' title='openldap proxy and beyond'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-8611340182461363503</id><published>2007-08-21T15:02:00.000-04:00</published><updated>2007-09-06T20:52:48.452-04:00</updated><title type='text'>nothing stays the same: adventures in directory rescue</title><content type='html'>OK. So this all relates to the downing of my company's primary master directory some weeks ago when the host server's system disk failed. Apparently on it's way out, the system caused some fatal corruption in the directory db that prevented it from starting up. Because that particular master was also the "hub" from which we replicate to our read-only replicas, losing the db also meant that we'd have to rebuild those replicas as well (a drawback of how Netscape engineered replication in it's directory servers). Yup, a pretty bad situation.&lt;br /&gt;&lt;br /&gt;When I first started with iPlanet Directory back in '00, I quickly learned the most efficient way to rebuild not only a master, but also a replica, directory in the event the underlying db got corrupted.&lt;br /&gt;&lt;br /&gt;For the most part I've continued using the procedures I developed back then until now. For example, to rebuild a replica I normally just did a re-initialization from the master over the wire.&lt;br /&gt;&lt;br /&gt;This time, instead of doing an online rebuild, I let the replication agreement wizard create an init file (an LDIF with all the pertinent info), shut down the replica and did an offline init using &lt;code&gt;ldif2db&lt;/code&gt;. This solved a couple of problems, the most important of which was that there was a Local Director in front of my replicas that would do a round-robin to a directory as long as it was listening (LD isn't very smart, it can't test to see if the directory is actually responding, just that it's listening). If I kept the directory online, which you &lt;em&gt;must&lt;/em&gt; do for an over-the-wire init, apps and users would hit a wall every time they got shifted over to the initializing directory.&lt;br /&gt;&lt;br /&gt;It also turns out that with the number of entries I now have in my directory (50,000 plus), the rebuild process also went faster using init files. This was especially true for my heavily indexed primary master, which I rebuilt from the secondary master.&lt;br /&gt;&lt;br /&gt;In all it took about an hour to get most everything back online, another hour to get the whole environment back running at peak performance. Because we use clustering in our SSO solution, most apps and their users were unaware of the outtage. We also bought ourselves some breathing space by assigning a CNAME that belonged to the dead master to it's partner, causing all traffic that was hardcoded for that CNAME to go to the functioning directory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-8611340182461363503?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/8611340182461363503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/8611340182461363503'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/08/nothing-stays-same.html' title='nothing stays the same: adventures in directory rescue'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-6455512647345192795</id><published>2007-08-21T14:13:00.000-04:00</published><updated>2007-08-21T14:56:55.742-04:00</updated><title type='text'>so what is the deal with openldap schema-checking?</title><content type='html'>The last few days I've been experimenting with loading some medium sized datasets into &lt;a href="http://www.openldap.org"&gt;OpenLDAP&lt;/a&gt;. Basically all I did was transform a dump of all the active entries in my company's directory into a format loadable into OpenLDAP without making any schema changes.&lt;br /&gt;&lt;br /&gt;Well, at least that was the plan.&lt;br /&gt;&lt;br /&gt;Right off the bat I was tripped up by the fact that the 'c' or 'countryName' attribute, although defined in the &lt;code&gt;core.schema&lt;/code&gt; file, is only included in the 'country' objectclass as an allowable attribute. No problem, I just added it to 'organizationalPerson' (hey, I &lt;strong&gt;am&lt;/strong&gt; eldapo, after all).&lt;br /&gt;&lt;br /&gt;Then I had some trouble with having a value like "9999999999" for 'facsimiletelephonenumber', with &lt;code&gt;ldapadd&lt;/code&gt; screaming at me about invalid syntax (the dreaded "error 21"). When I checked the &lt;code&gt;core.schema&lt;/code&gt; file I found 'facsimiletelephonenumber' or 'fax' had a different syntax code that 'telephonenumber'. I fixed that too, adding the EQUALITY and SUBSTR directive from 'telephonenumber' to allow me to index it for eq and sub searches (any good whitepages directory should let you search on fax as well as voice numbers for someone).&lt;br /&gt;&lt;br /&gt;There were a few other odd schema violation notices as well, some inexplicable even on careful examination. In the end I did an &lt;code&gt;ldapadd -c&lt;/code&gt; to just load the bulk of the entries (which came to just over 15,000).&lt;br /&gt;&lt;br /&gt;Of course schema-checking can no longer be disabled in the latest OpenLDAP code (since at least 2.2.28), which Kurt Zeilenga &lt;a href="http://www.openldap.org/lists/openldap-software/200509/msg00476.html"&gt;explains&lt;/a&gt; was necessary because the feature conflicted with other enhancements being rolled into the code (he adds that it was broken anyway, to which I can attest from personal experience).&lt;br /&gt;&lt;br /&gt;When I first started working with OpenLDAP I quickly learned that hacking the schema was an essential skill I needed to develop. For the most part you can get away with adding your own custom objectlasses (usually auxilliary) and attributes to get around the limitations of what ships with the product. Oh yeah, you'll also need to understand the difference between structural and auxilliary objectclasses. For example see &lt;a href="http://www.openldap.org/lists/openldap-software/200504/msg00557.html"&gt;this&lt;/a&gt; discussion thread (and what preceeded it). A succinct explaination of the matter can be found in &lt;a href="http://www.openldap.org/faq/data/cache/883.html"&gt;this&lt;/a&gt; article in the &lt;a href="http://www.openldap.org/faq/data/cache/1.html"&gt;OpenLDAP Faq-O-Matic&lt;/a&gt; (which I did &lt;em&gt;not&lt;/em&gt; author, though I wish I had).&lt;br /&gt;&lt;br /&gt;The aggravating thing is that I've loaded similar data, in fact data that had not had a fraction of the scrubbing, into both Netscape family (Sun, Fedora/RedHat) and Oracle directories without this much trouble -- once again demonstrating that open source is &lt;em&gt;not&lt;/em&gt; for amateurs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-6455512647345192795?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6455512647345192795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6455512647345192795'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/08/whats-with-openldap-schema.html' title='so what &lt;em&gt;is&lt;/em&gt; the deal with openldap schema-checking?'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-3935715771719595721</id><published>2007-08-04T11:01:00.000-04:00</published><updated>2007-08-04T11:24:14.498-04:00</updated><title type='text'>forcing the orcladmin password</title><content type='html'>Someone asked, so here it is.&lt;br /&gt;&lt;br /&gt;Something for all my fellow Oracle Internet Directory admins.&lt;br /&gt;&lt;br /&gt;This is fully documented on MetaLink, but in various places.&lt;br /&gt;&lt;br /&gt;Here's the situation:&lt;br /&gt;&lt;br /&gt;You've either forgotten the cn=orcladmin password, or someone has impolitely changed it without letting anyone know the new one. To add insult to injury, in the latter case the dumb schmuck has also altered the ODS (Oracle Directory Schema) user password on the infrastructure database so that OID won't even start.&lt;br /&gt;&lt;br /&gt;The solution:&lt;br /&gt;&lt;br /&gt;Go to $ORACLE_HOME/ldap/admin and rename the oidpwdlldap1 and oidpwddr[instance name] files.&lt;br /&gt;&lt;br /&gt;Use sqlplus to log into the infrastructure database back-ending OID as SYSTEM.&lt;br /&gt;&lt;br /&gt;Reset the password for ODS (the "Oracle Directory Schema" user).&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;code&gt;SQL&amp;gt;&amp;gt; alter user ODS identified by [new password]&lt;/code&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Then execute&lt;br /&gt;&lt;br /&gt;&lt;code&gt;oidpasswd create_wallet=true&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and, finally, do a&lt;br /&gt;&lt;br /&gt;&lt;code&gt;oidpasswd connect=[connect string] change_oiddb_pwd=true&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;to set the orcladmin superuser password to the same one you just forced for ODS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-3935715771719595721?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/3935715771719595721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/3935715771719595721'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/08/forcing-orcladmin-password.html' title='forcing the orcladmin password'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-623546525414475860</id><published>2007-07-18T20:26:00.000-04:00</published><updated>2007-09-06T20:56:58.803-04:00</updated><title type='text'>When only direct db access will do</title><content type='html'>Over the years I've had a few "close calls" where a corrupted directory db was brought back from the abyss. Had one of those the last couple of days, when one of our newly installed Oracle Internet Directory (OID) instances started misbehaving after I screwed up the acl (access control list) while trying to use the aci (access control instruction) "wizard" in oidadmin to create a new set of permissions.&lt;br /&gt;&lt;br /&gt;In seven years of working with LDAP directories. I've come to view the GUI administration consoles that ship with commercial products with deep suspicion. Ditto for the "automatic" configuration routines in almost all 3rd party apps that claim to be "LDAP compliant". In this case I should have known better, but the whole purpose of the work I've been doing the last few months is to learn as much as I can about the new application stack so I can provide useful input on how we go forward.&lt;br /&gt;&lt;br /&gt;Anyway, the problem we (Oracle Support and I) were faced with was a cn=Users container that could no longer be searched, &lt;em&gt;even by cn=orcladmin&lt;/em&gt;. Now "cn=orcladmin" is the root account for OID, just like "cn=Directory Manager" for the Netscape family of directories (Netscape, iPlanet, Sun, RedHat), or OpenLDAP's "cn=Manager". Of all the login accounts on the directory, this is &lt;strong&gt;the one&lt;/strong&gt; that is supposed to not be subject to access controls. In our case, every time we tried to search the container over LDAP (using ldapsearch) the directory process would die and get restarted by Oracle's monitor process.&lt;br /&gt;&lt;br /&gt;After going through a series of diagnostic procedures (stopping and starting different pieces of the stack and then reading the logs), it was finally determined that the way to deal with this was to use Oracle's "bulk" utilities to access the underlying database and restore it to health.&lt;br /&gt;&lt;br /&gt;We first issued an "opmnctl shutdown" to kill all running processes, and then used &lt;code&gt;ldifwrite&lt;/code&gt; to dump the entire cn=Users container directly from the datatabase to an LDIF file. Then we used &lt;code&gt;bulkdelete&lt;/code&gt; to remove the container, and all it's subentries, from the database. I then edited the LDIF file to remove the corrupt aci from the container base. Finally, &lt;code&gt;bulkload&lt;/code&gt; was used to re-load the corrected LDIF back into the database. During this process the data was reindexed and subjected to rigorous checking.&lt;br /&gt;&lt;br /&gt;A "opmnctl startall" brought the directory and it's associated processes back on line, and after a few simple tests using ldapsearch and ldapmodify we were satisfied all was well again.&lt;br /&gt;&lt;br /&gt;Here's the syntax for the commands used during this recovery (during each operation you will be prompted for the root directory user (cn=orcladmin) password, which should be the same as that for the ODS database user):&lt;br /&gt;&lt;br /&gt;[In these examples my directory root is "dc=mycompany,dc=com", "testinf" is the $ORACLE_SID for the infrastructure database where directory data is stored and "mydata.ldif" is my LDIF data file. Where "\" appears at the end of a line, it is a "continuation character" indicating that the line should not be broken by a carriage return]&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Dumping the container data from the database&lt;/em&gt;&lt;code&gt;&lt;br /&gt;$ORACLE_HOME/ldap/bin/ldifwrite connect=testinf basedn="cn=Users, \&lt;br /&gt;dc=mycompany,dc=com" ldiffile=/tmp/mydata.ldif&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Removing the container from the database&lt;/em&gt;&lt;code&gt;&lt;br /&gt;$ORACLE_HOME/ldap/bin/bulkdelete connect=testinf basedn="cn=Users, \&lt;br /&gt;dc=mycompany,dc=com"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Reloading the LDIF data directly into the database&lt;/em&gt;&lt;code&gt;&lt;br /&gt;$ORACLE_HOME/ldap/bin/bulkload connect=testinf check="TRUE" \&lt;br /&gt;generate="TRUE" append="TRUE" file=/tmp/mydata.ldif&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Lest it appear that Oracle is alone in making such lifesaving "direct to database" methods available, Sun/RedHat and OpenLDAP all have similar tools used to directly manipulated their underlying BerkeleyDB hash table managers (BerkeleyDB is now, ironically, owned by Oracle).&lt;br /&gt;&lt;br /&gt;For OpenLDAP these are &lt;code&gt;slapcat&lt;/code&gt; for dumping data from the db, and &lt;code&gt;slapadd&lt;/code&gt; to load data directly into the db. With OpenLDAP there is no way to directly delete just a portion of the directory tree. You've got to dump and reload the whole thing (making whatever changes you need to the LDIF file in between).&lt;br /&gt;&lt;br /&gt;Sun/RedHat have a set of command line scripts, &lt;code&gt;db2ldif&lt;/code&gt; and &lt;code&gt;ldif2db&lt;/code&gt; that you to dump and reload data from the db, but still require you to in essence reload everything if you want to clean it up. For practical purposes you'd want to do this on a Netscape family directory anyway, to make sure all indexes are regenerated correctly (not always a given with their architecture).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-623546525414475860?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/623546525414475860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/623546525414475860'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/07/when-only-direct-db-access-will-do.html' title='When &lt;em&gt;only&lt;/em&gt; direct db access will do'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-8447173433569641658</id><published>2007-07-14T02:25:00.000-04:00</published><updated>2007-08-15T15:08:19.199-04:00</updated><title type='text'>OID: Spit install = Splitting Headache</title><content type='html'>Alot of people who read this are going to disagree with what I'm about to say. But here it is.&lt;br /&gt;&lt;br /&gt;When building an Oracle 10g AS infrastructure most enterprises will do a split install, putting the application server(s) on one box and the metadata repository (Oracle database) on another. In many cases the applications may even be split up, with Oracle Internet Directory (OID) running on one box, SSO another and so on.&lt;br /&gt;&lt;br /&gt;This is insane.&lt;br /&gt;&lt;br /&gt;OID is the foundation for any Oracle 10g infrastructure. If OID is down, you're hosed.&lt;br /&gt;&lt;br /&gt;Restart lsnrctl, or lose your connection with the database either because the db or it's host is being recycled, or because of an errant firewall rule or some other network connectivity transient, and OID will go out to lunch.&lt;br /&gt;&lt;br /&gt;As much as I admire and respect all DBA's, in the six months I've worked with OID the &lt;em&gt;only&lt;/em&gt; times it's hung or toppled over is when, for some reason, the database sitting on a remote server became unavailable. Most of the time because the instance I needed was down and no one realized it's significance. Actually, make that 2 months. Up until that time all the test installs I used had the database on the same host as the infrastructure and I made damn well sure it was up.&lt;br /&gt;&lt;br /&gt;There's nothing more disheartening that having to jump into a VNC session to demonstrate to an experienced DBA that the problem &lt;em&gt;really is&lt;/em&gt; a database issue (tnsping is useless for this, the best method is to log on as the system user, make sure your environment is set and fire up sqlplus as ODS).&lt;br /&gt;&lt;br /&gt;Many years ago I made a similar argument about locating Microsoft Active Directory database files on a SAN. Given that AD is the heart and soul of the server operating system itself, putting the edb files off on remote storage is clearly asking for trouble.&lt;br /&gt;&lt;br /&gt;While using a remote db could have some benefits, like allowing for a high availability configuration such as multiple infrastructure servers connected to a RAC, given the critical place that OID has in the environment I still think it would be better to have the metadata db on the same box as OID. If the environment needs to be highly available, you can still RAC at the app tier or use OID's robust multi-master replication feature.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-8447173433569641658?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/8447173433569641658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/8447173433569641658'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/07/oid-spit-install-split-ting-headache.html' title='OID: Spit install = Split&lt;em&gt;ting&lt;/em&gt; Headache'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-5668503468437636621</id><published>2007-07-05T16:55:00.001-04:00</published><updated>2007-07-05T17:05:49.365-04:00</updated><title type='text'>how do i unlock an EBS account?</title><content type='html'>Make the value for END_DATE in FND_USER null, of course.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;SQL&amp;gt;UPDATE FND_USER&lt;br /&gt;SQL&amp;gt;SET END_DATE = ''&lt;br /&gt;SQL&amp;gt;WHERE USER_NAME = '[Your User Name]';&lt;br /&gt;...&lt;br /&gt;SQL&amp;gt;COMMIT;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To do it in Perl just use &lt;a href="http://eldapo.blogspot.com/2007/07/using-perl-to-re-link-ebs-guids.html"&gt;the code&lt;/a&gt; I've got below (in mod_ebsdb) and substitute the above SQL for the value of $sql (you might want to change what you print to console in order to prevent confusion). Like this:&lt;code&gt;&lt;pre&gt;&lt;br /&gt;my $sql= "UPDATE FND_USER&lt;br /&gt;         SET END_DATE = ''&lt;br /&gt;         WHERE USER_NAME = '$user_name'";&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;The aforementioned code will commit the transaction, assuming it passes the simple "Does this USER_NAME exist?" test.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-5668503468437636621?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/5668503468437636621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/5668503468437636621'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/07/how-do-i-unlock-ebs-account.html' title='how do i unlock an EBS account?'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-6945322633835762164</id><published>2007-07-05T14:04:00.000-04:00</published><updated>2007-07-05T14:43:50.177-04:00</updated><title type='text'>indexing attributes on oracle internet directory</title><content type='html'>Basic task that we all have to do, no matter what vendor's directory we use.&lt;br /&gt;&lt;br /&gt;For OID, like almost everything else, it requires a special tool to reindex the database. The tool is called &lt;code&gt;catalog&lt;/code&gt;. It's found under $ORACLE_HOME/ldap/bin.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;$ORACLE_HOME/ldap/bin/catalog connect=[oiddbsid] add="TRUE" \&lt;br /&gt;attribute="[attributename]" [or file="filename"]&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;You can do a bunch of attributes with the optional "file=" parameter instead of "attribute=", where the value would be the path to a text file containing a simple list of the attributes to be indexed, one attribute name per line.&lt;br /&gt;&lt;br /&gt;Sometimes the change will be effective right after running the command (Oracle actually recommends shutting down OID before indexing -- which makes sense on a heavily used production system). Other times you'll have to restart OID to see the change take place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-6945322633835762164?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6945322633835762164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6945322633835762164'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/07/indexing-attributes-on-oracle-internet.html' title='indexing attributes on oracle internet directory'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-8324607748014257709</id><published>2007-07-03T10:07:00.000-04:00</published><updated>2007-07-05T17:23:46.231-04:00</updated><title type='text'>Using Perl to Re-Link EBS GUIDS</title><content type='html'>If you've been following the last few posts you've probably guessed that I'm now in the middle of a pretty intense effort to get control of user management in an Oracle Internet Directory (OID) + Enterprise Business Suite (EBS) environment. What's happened is that the consultants, developers and business teams have been out creating accounts on the EBS database ahead of the security team's effort to create users on OID. Now that we've finally begun to integrate EBS with the new Oracle 10g Application Server Single Sign-On Infrastructure, we need to make sure that the user's OID entries are properly linked with their EBS accounts. This happens "automagically" in most cases, but in our situation there was a last-minute decision to change our DIT (Directory Information Tree) structure that required the deletion and re-creation of all our new OID entries AFTER they'd been linked to their corresponding EBS account.&lt;br /&gt;&lt;br /&gt;To avoid having to use &lt;a href="http://eldapo.blogspot.com/2007/06/linking-oid-orclguid-with-userguid-in.html"&gt;the tedious procedure&lt;/a&gt; Oracle recommends to fix this that I outlined earlier, I decided to put together a script to automate the process. Below is the result, which still contains some (commented) debugging code that I think others may find useful.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;#!/usr/bin/perl&lt;br /&gt;# updateguid.pl Updates USER_GUID on EBS FND_USER from orclguid value &lt;br /&gt;# in corresponding OID user entry.&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use Net::LDAP;&lt;br /&gt;use Net::LDAP::Entry;&lt;br /&gt;use Net::LDAP::LDIF;&lt;br /&gt;use DBI;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;our($OIDhost,$OIDusr,$OIDpw,$ebssid,$ebsappusr,$ebsapppw);&lt;br /&gt;&lt;br /&gt;my $HOME = $ENV{'HOME'};&lt;br /&gt;&lt;br /&gt;$ENV{'TNS_ADMIN'} = "/etc/oracle";&lt;br /&gt;&lt;br /&gt;require "$HOME/etc/orclapp.conf";&lt;br /&gt;&lt;br /&gt;my $usrbase = "cn=users,dc=mycorp,dc=com";&lt;br /&gt;my $query = "(givenname=*)"; # Just hit the "real" people&lt;br /&gt;my @attrs = qw(uid orclguid);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;fix_guids();&lt;br /&gt;&lt;br /&gt;sub fix_guids {&lt;br /&gt;&lt;br /&gt;  my $ldap = Net::LDAP-&gt;new($OIDhost);&lt;br /&gt;  my $mesg = $ldap-&gt;bind($OIDusr, password =&gt;$OIDpw);&lt;br /&gt;  die ("failed to bind with ",$mesg-&gt;code(),"\n") if $mesg-&gt;code();&lt;br /&gt;&lt;br /&gt;  $mesg = $ldap-&gt;search( base =&gt;$usrbase,&lt;br /&gt;           filter =&gt;$query,&lt;br /&gt;    scope =&gt;'sub',&lt;br /&gt;    attrs =&gt;\@attrs&lt;br /&gt;&lt;br /&gt; );&lt;br /&gt;&lt;br /&gt;  die "Failed to search with ",$mesg-&gt;error(),"\n" if $mesg-&gt;code();&lt;br /&gt;&lt;br /&gt;  while (my $entry = $mesg-&gt;shift_entry()) {&lt;br /&gt;&lt;br /&gt;      my $dn = $entry-&gt;dn();&lt;br /&gt;      my $uid = $entry-&gt;get_value('uid');&lt;br /&gt;      my $orclguid = $entry-&gt;get_value('orclguid');&lt;br /&gt;&lt;br /&gt;      ## Use this code block for testing guid retrieval&lt;br /&gt;      # my $user_name = read_ebsdb($uid);&lt;br /&gt;      #print $user_name, "\n";&lt;br /&gt;      # print $orclguid, " \n";&lt;br /&gt;      # my $user_guid = read_ebsdb($uid);&lt;br /&gt;      # print $user_guid, "\n";&lt;br /&gt;&lt;br /&gt;      mod_ebsdb($uid,$orclguid);&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# This subroutine is for testing guid retrieval&lt;br /&gt;sub read_ebsdb {&lt;br /&gt;&lt;br /&gt;  my $user_name = @_[0];&lt;br /&gt;&lt;br /&gt;  my $dbh = DBI-&gt;connect("dbi:Oracle:$ebssid",&lt;br /&gt;   "$ebsappusr",&lt;br /&gt;   "$ebsapppw",&lt;br /&gt;&lt;br /&gt; ) or die "Database not connected: $DBI::errstr";&lt;br /&gt;&lt;br /&gt;  my $sql = "SELECT USER_GUID&lt;br /&gt;      FROM FND_USER&lt;br /&gt;      WHERE USER_NAME = '$user_name'";&lt;br /&gt;&lt;br /&gt;  my $sth = $dbh-&gt;prepare($sql);&lt;br /&gt;&lt;br /&gt;  $sth-&gt;execute();&lt;br /&gt;&lt;br /&gt;  while (my ($user_guid)  = $sth-&gt;fetchrow()) {&lt;br /&gt;&lt;br /&gt;      return $user_guid;&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  $sth-&gt;finish;&lt;br /&gt;  $dbh-&gt;disconnect;&lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;# This is the subroutine that commits changes to EBS FND_USER&lt;br /&gt;sub mod_ebsdb {&lt;br /&gt;&lt;br /&gt;  my $user_name = @_[0];&lt;br /&gt;  my $orclguid = @_[1];&lt;br /&gt;&lt;br /&gt;  # Use AutoCommit =&gt;0 to allow rollback in case of error  &lt;br /&gt;  my $dbh = DBI-&gt;connect("dbi:Oracle:$ebssid",&lt;br /&gt;     "$ebsappusr",&lt;br /&gt;   "$ebsapppw",&lt;br /&gt;   {AutoCommit =&gt; 0}&lt;br /&gt;&lt;br /&gt;  ) or die "Database not connected: $DBI::errstr";&lt;br /&gt;&lt;br /&gt;  my $sql = "UPDATE FND_USER&lt;br /&gt;      SET USER_GUID = '$orclguid'&lt;br /&gt;             WHERE USER_NAME = '$user_name'";&lt;br /&gt;&lt;br /&gt;  my $sth = $dbh-&gt;prepare($sql);&lt;br /&gt;&lt;br /&gt;  my $rows_affected = $sth-&gt;execute();&lt;br /&gt;&lt;br /&gt;  if ($rows_affected &amp;gt 1) {&lt;br /&gt;&lt;br /&gt;    $dbh-&gt;rollback();&lt;br /&gt; print "There are $rows_affected users with ";&lt;br /&gt; print "the user name $user_name. Transaction cancelled!\n";&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;  else {&lt;br /&gt;    &lt;br /&gt;      $dbh-&gt;commit();&lt;br /&gt;   print "$user_name USER_GUID is now $orclguid\n";&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;__END__;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-8324607748014257709?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/8324607748014257709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/8324607748014257709'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/07/using-perl-to-re-link-ebs-guids.html' title='Using Perl to Re-Link EBS GUIDS'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-4594967513783351863</id><published>2007-07-02T16:48:00.000-04:00</published><updated>2007-07-03T09:03:57.496-04:00</updated><title type='text'>Perl Script to List Accounts in EBS Database</title><content type='html'>Just when you thought it was safe to go in the water!&lt;br /&gt;&lt;br /&gt;Here's a quick DBD::Oracle script I cooked up to do what I did using sqlplus in the previous article. I use an external config file to store the Oracle SID (i.e. service name), user (in this case 'APPS') and password. Notice how straightforward it is to plug a standard Oracle query into the code and get results back. The only shortcoming with this script is that the sqlplus page formatting doesn't come through, so if you wanted to do a report you'd need to insert your own.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use DBI;&lt;br /&gt;&lt;br /&gt;our($orclsid,$orclusr,$orclpw);&lt;br /&gt;&lt;br /&gt;my $HOME = $ENV{'HOME'};&lt;br /&gt;&lt;br /&gt;$ENV{'TNS_ADMIN'} = "/etc/oracle";&lt;br /&gt;&lt;br /&gt;require "$HOME/etc/orclapp.conf";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;my $dbh = DBI-&gt;connect("dbi:Oracle:$orclsid",&lt;br /&gt;    "$orclusr",&lt;br /&gt;    "$orclpw",&lt;br /&gt;&lt;br /&gt; ) or die "Database not connected: $DBI::errstr";&lt;br /&gt;&lt;br /&gt;my $sql = qq[ SELECT USER_NAME FROM FND_USER ];&lt;br /&gt;&lt;br /&gt;my $sth = $dbh-&gt;prepare($sql);&lt;br /&gt;&lt;br /&gt;$sth-&gt;execute();&lt;br /&gt;&lt;br /&gt;while (my($user_id)  = $sth-&gt;fetchrow()) {&lt;br /&gt;&lt;br /&gt;    print "$user_id\n";&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$sth-&gt;finish;&lt;br /&gt;$dbh-&gt;disconnect;&lt;br /&gt;&lt;br /&gt;__END__;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;My next task will be to script the linking of OID orclguids to EBS user accounts in FND_USER. Should be fun.&lt;br /&gt;&lt;br /&gt;Some resources I used to do this were &lt;a href="http://www.pythian.com/blogs/wp-content/uploads/introduction-dbd-oracle.html#fetching-data"&gt;An Introduction to DBD::Oracle&lt;/a&gt; on the &lt;a href="http://www.pythian.com"&gt;Pythian&lt;/a&gt; site. I also used my own &lt;a href="http://onemoretech.blogspot.com/2007/03/oracle-instantclient.html"&gt;Oracle Instantclient and DBD::Oracle&lt;/a&gt; to properly make and install the module.&lt;br /&gt;&lt;br /&gt;Note: Important addition! The line "$ENV{'TNS_ADMIN'} = "/etc/oracle" sets the $TNS_ADMIN environment variable so the script can use an external tnsnames.ora file -- which is handy if you're working in a multiple database environment and want to be able to test your connect strings using sqlplus (or listener status with tnsping).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-4594967513783351863?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4594967513783351863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4594967513783351863'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/07/perl-script-to-list-accounts-in-ebs.html' title='Perl Script to List Accounts in EBS Database'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-3897712404169766756</id><published>2007-06-29T17:02:00.000-04:00</published><updated>2007-06-29T17:12:33.496-04:00</updated><title type='text'>list accounts on the EBS database</title><content type='html'>Kind of related to the previous post.&lt;br /&gt;&lt;br /&gt;I'm an sqlplus beginner. So I think this is really important info. Someday soon I'll be embarrassed I even bothered to write this.&lt;br /&gt;&lt;br /&gt;Log onto the EBS database as the APPS user.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;sqlplus APPS/{appspw]@[dbname]&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then do this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;SQL&amp;gt; SPOOL /tmp/userlist.txt;&lt;br /&gt;SQL&amp;gt; SELECT USER_NAME FROM FND_USER;&lt;br /&gt;...&lt;br /&gt;SQL&amp;gt; SPOOL OFF;&lt;br /&gt;SQL&amp;gt; quit&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You'll get a nice list of all the User ID's on the database. The "SPOOL" command will print the output to the file indicated, so you don't have to do a screen scrape.&lt;br /&gt;&lt;br /&gt;If you want everything in the table substitute '*' for 'USER_NAME'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-3897712404169766756?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/3897712404169766756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/3897712404169766756'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/06/list-accounts-on-ebs-database.html' title='list accounts on the EBS database'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-6852963453531977860</id><published>2007-06-29T16:37:00.000-04:00</published><updated>2007-06-29T17:09:47.230-04:00</updated><title type='text'>linking an OID orclguid with a USER_GUID in EBS</title><content type='html'>Unless you're actually looking for the answer this article provides, you probably won't have any idea what I'm talking about.&lt;br /&gt;&lt;br /&gt;Here's the situation. You've put up an Oracle 10g infrastructure, complete with it's own Oracle Internet Directory (OID). By some unknown magic, your 10g infrastructure (including OID and Single Sign-on, SSO) has just been integrated with an existing Oracle Enteprise Business Suite (EBS) Applications instance.&lt;br /&gt;&lt;br /&gt;Part of the integration involves setting up automatic provisioning of user accounts in EBS from entries created in OID. You create a new user in OID, and voila! the user gets an account (albeit one with limited access) in EBS.&lt;br /&gt;&lt;br /&gt;Your DBAs, developers, consultants, admins and just about everyone who can draw a breath have been haphazardly creating and deleting accounts in both OID and EBS both before and after the integration. Ugh.&lt;br /&gt;&lt;br /&gt;Finally, as expected, some of those accounts are now out of sync. You try to create a new account on EBS for an existing OID user and you get the dreaded "account already there" error. Checking the FND_USER table on the EBS database you find that, sure enough, it &lt;em&gt;is&lt;/em&gt; there. But no matter how hard you try, you can't seem to get SSO to log you into EBS. The OID entry won't link to the EBS account. Instead of jumping up and down screaming, calm down. Here's what you do.&lt;br /&gt;&lt;br /&gt;Log onto the server hosting EBS as the system user (something like "oracle" or "oraebs"). If the .bash_profile for this user doesn't set the environment for you, you'll need to source it -- hopefully from a file you've created like "ebs.env".&lt;br /&gt;&lt;br /&gt;First get the orclguid value from the corresponding OID entry. Since this is a system attribute, it won't show up in a normal search. You need to specify it.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;ldapsearch -h [oidhost] -D "cn=orcladmin" -w [adminpw] -b "dc=my,dc=corp" \&lt;br /&gt;-s sub "(cn=[userid])" orclguid&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This will return a long string of numbers and letters for orclguid. Highlight and copy it.&lt;br /&gt;&lt;br /&gt;Now fire up sqlplus and connect to the EBS database as the "APPS" user.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;sqlplus APPS/{appspw]@[dbname]&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now follow the following procedure:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;SQL&amp;gt; SELECT USER_GUID FROM FND_USER&lt;br /&gt;WHERE USER_NAME='[EBS User ID]';&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Where 'USERID' is the ID of the user account you need to fix.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;SQL&amp;gt; UPDATE FND_USER&lt;br /&gt;SET USER_GUID = '[orclguid value]'&lt;br /&gt;WHERE USER_NAME = '[EBS User ID]';&lt;br /&gt;...&lt;br /&gt;SQL&amp;gt; COMMIT;&lt;br /&gt;...&lt;br /&gt;SQL&amp;gt;quit&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There it is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-6852963453531977860?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6852963453531977860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6852963453531977860'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/06/linking-oid-orclguid-with-userguid-in.html' title='linking an OID orclguid with a USER_GUID in EBS'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-886725906970521289</id><published>2007-06-17T21:41:00.000-04:00</published><updated>2007-06-17T22:39:30.554-04:00</updated><title type='text'>ldap browser on linux</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_enG0JqsTrkM/RnXwWtoB9DI/AAAAAAAAAGg/Pnda81rM5To/s1600-h/lbe.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_enG0JqsTrkM/RnXwWtoB9DI/AAAAAAAAAGg/Pnda81rM5To/s200/lbe.png" alt="" id="BLOGGER_PHOTO_ID_5077228427925386290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Jarek Gawor's &lt;a href="http://www-unix.mcs.anl.gov/%7Egawor/ldap/"&gt;LDAP Browser-Editor&lt;/a&gt; has been one of the most popular LDAP tools in use by directory admins for at least 7 years. Never mind that the last release of the software was v2.8.2b2 (that's &lt;em&gt;Beta&lt;/em&gt; 2) in 2001, it remains top on my list because, warts and all (not the least of which is that it was programmed using Java Swing), it is still the best at what it does.&lt;br /&gt;&lt;br /&gt;Installing and configuring it on Linux has never been hard, unless you want to make it play nice in a multi-user environment. If you don't want to force each user to install their own personal copy, you're going to have to make some changes to the shipping shell script used to launch the app and make a dot directory in your user's home.&lt;br /&gt;&lt;br /&gt;My standard setup puts the unarchived app code into a directory called &lt;code&gt;/opt/ldapbrowser&lt;/code&gt;, which I normally create by simply copying &lt;code&gt;&lt;span style="color:red;"&gt;Browser282b2.tar.gz&lt;/span&gt;&lt;/code&gt; to &lt;code&gt;/opt&lt;/code&gt; and doing a &lt;code&gt;tar czf&lt;/code&gt; on it right there.&lt;br /&gt;&lt;br /&gt;Next, I backup the shipping &lt;code&gt;lbe.sh&lt;/code&gt; and replace it with my own:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;JAVA_HOME=/usr/java/jdk1.5.0_11&lt;br /&gt;LBE_ROOT=/opt/ldapbrowser&lt;br /&gt;&lt;br /&gt;cd ~/.lbe&lt;br /&gt;&lt;br /&gt;${JAVA_HOME}/bin/java -jar ${LBE_ROOT}/lbe.jar $1 $2 $3 $4 $5 $6 $7 $8 $9&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then I run a symlink from the new lbe.sh to /usr/bin/lbe:&lt;br /&gt;&lt;code&gt;ln -s /opt/ldapbrowser/lbe.sh /usr/bin/lbe&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Finally, I go and create an &lt;code&gt;.lbe&lt;/code&gt; directory in my user's home and copy &lt;code&gt;attributes.config&lt;/code&gt; from &lt;code&gt;/opt/ldapbrowser&lt;/code&gt; into it. I also run symlinks from &lt;code&gt;/opt/ldapbrowser/help&lt;/code&gt; and &lt;code&gt;/opt/ldapbrowser/templates&lt;/code&gt; into .lbe, so the resources in those directories will display properly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-886725906970521289?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/886725906970521289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/886725906970521289'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/06/ldap-browser-on-linux.html' title='ldap browser on linux'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_enG0JqsTrkM/RnXwWtoB9DI/AAAAAAAAAGg/Pnda81rM5To/s72-c/lbe.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-7146805412919400947</id><published>2007-06-12T14:13:00.000-04:00</published><updated>2007-06-12T14:16:30.100-04:00</updated><title type='text'>Changing Active Directory Passwords Using LDAPS</title><content type='html'>&lt;em&gt;This is an article from my old personal site.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Which is the point of what came before ...&lt;br /&gt;&lt;br /&gt;Just a brief script to show how to change an Active Directory user's password using LDAPS (LDAP over SSL). Requires that the target Active Directory domain controller be SSL enabled, as described in this article. In Active Directory password data is not stored in userpassword, but instead the hidden "system" attribute, unicodePwd. The script contains a routine used to convert the ASCII string supplied for the password into it's Unicode equivalent.&lt;br /&gt;&lt;br /&gt;The "require" line simply imports config info (bind dn and password, etc.) for the script to use.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;use Net::LDAP;&lt;br /&gt;use Net::LDAP::Entry;&lt;br /&gt;use Unicode::Map8;&lt;br /&gt;use Unicode::String qw(utf16);&lt;br /&gt;&lt;br /&gt;our($adHost,$adAdmin,$adPass);&lt;br /&gt;require "../etc/ldap.inc";&lt;br /&gt;&lt;br /&gt;my $adURI = "ldaps://$adHost";&lt;br /&gt;my $basedn = "DC=test,DC=example,DC=com";&lt;br /&gt;my @attrs = qw(cn sn givenname uid mail unicodePwd);&lt;br /&gt;my $query = "(cn=orson)";&lt;br /&gt;my $newpw = "rosebud";&lt;br /&gt;&lt;br /&gt;my $charmap = Unicode::Map8-&gt; new('latin1') or die $!;&lt;br /&gt;$newpw = $charmap-&gt; tou('"'.$newpw.'"')-&gt; byteswap()-&gt; utf16();&lt;br /&gt;&lt;br /&gt;my $ldaps = Net::LDAP-&gt; new( $adURI ) or die "$@";&lt;br /&gt;&lt;br /&gt;my $mesg = $ldaps-&gt; bind($adAdmin, password =&gt;$adPass);&lt;br /&gt;&lt;br /&gt;$mesg = $ldaps-&gt; search (&lt;br /&gt; base =&gt; $basedn,&lt;br /&gt; scope =&gt; 'sub',&lt;br /&gt; filter =&gt; $query,&lt;br /&gt; attrs =&gt; \@attrs&lt;br /&gt; );&lt;br /&gt;&lt;br /&gt;while (my $entry = $mesg-&gt; shift_entry()) {&lt;br /&gt;    my $userdn = $entry-&gt; dn;&lt;br /&gt;    print $userdn, "\n";&lt;br /&gt;    # $entry-&gt; dump;&lt;br /&gt;    $entry-&gt; replace('unicodePwd' =&gt; $newpw);&lt;br /&gt;    $entry-&gt; update($ldaps);&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$ldaps-&gt; unbind;&lt;br /&gt;&lt;br /&gt;__END__;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-7146805412919400947?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/7146805412919400947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/7146805412919400947'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/06/changing-active-directory-passwords.html' title='Changing Active Directory Passwords Using LDAPS'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-5022343501634855972</id><published>2007-06-12T14:11:00.000-04:00</published><updated>2007-06-12T14:16:03.784-04:00</updated><title type='text'>LDAPS with Net::LDAP</title><content type='html'>&lt;em&gt;This is an article from my old personal site.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;This script is an example of how to make an LDAP over SSL connection. LDAPS requires a special secure port, usually TCP port 636. The target server in this instance is a Microsoft Active Directory domain controller that has been SSL enabled (a configuration discussed in another article).&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;use Net::LDAP;&lt;br /&gt;&lt;br /&gt;our($adHost,$adAdmin,$adPass);&lt;br /&gt;require "../etc/ldap.inc";&lt;br /&gt;&lt;br /&gt;my $basedn = "DC=test,DC=example,DC=com";&lt;br /&gt;my @attrs = qw(cn sn givenname uid mail unicodepwd);&lt;br /&gt;my $query = "(cn=Administrator)";&lt;br /&gt;&lt;br /&gt;my $ldaps = Net::LDAP-&gt; new( "ldaps://$adHost" ) or die "$@";&lt;br /&gt;&lt;br /&gt;my $mesg = $ldaps-&gt; bind($adAdmin, password =&gt; $adPass) or die "$@";&lt;br /&gt;&lt;br /&gt;$mesg = $ldaps-&gt; search (&lt;br /&gt; base =&gt; $basedn,&lt;br /&gt; scope =&gt; 'sub',&lt;br /&gt; filter =&gt; $query,&lt;br /&gt; attrs =&gt; \@attrs&lt;br /&gt; );&lt;br /&gt;&lt;br /&gt;while (my $entry = $mesg-&gt; shift_entry()) {&lt;br /&gt;&lt;br /&gt;    $entry-&gt; dump;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$ldaps-&gt; unbind;&lt;br /&gt;&lt;br /&gt;__END__;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-5022343501634855972?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/5022343501634855972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/5022343501634855972'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/06/ldaps-with-netldap.html' title='LDAPS with Net::LDAP'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-6110305175915665704</id><published>2007-06-12T13:48:00.000-04:00</published><updated>2007-06-12T14:24:48.066-04:00</updated><title type='text'>SSL Enabling Active Directory</title><content type='html'>&lt;em&gt;This is an article from my old personal site.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;There are several ways to do this. The easiest is to enable an Enterprise CA and let auto-enrollment propagate SSL certificates to all domain controllers (DC's). This is Microsoft's preference. Most Active Directory (AD) administrators are loathe to go along with this. First, because they believe SSL is an evil virus created by Netscape, and second, because they're afraid to alter the shipping configuration of AD in any way. From their point of view AD is already complicated enough without mucking things up with some Internet standard protocol functionality. As a result of this, most real-world LDAP admins compromise on getting at least one DC enabled for SSL. The most non-intrusive way to do this is to use a 3rd party certificate authority (CA) to sign an appropriately formed certificate request. The resulting certificate is then imported, along with the CA's own certificate, into the target DC's local certificate store.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Official Documentation&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;321051"&gt; How to enable LDAP over SSL with a third-party certification authority&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://technet2.microsoft.com/WindowsServer/en/Library/091cda67-79ec-481d-8a96-03e0be7374ed1033.mspx?pf=true"&gt; Best Practices for Implementation of a Microsoft Windows Server 2003 Public Key Infrastructure&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first article listed above is &lt;em&gt;the&lt;/em&gt; official "how to" from Microsoft on using a 3rd party CA to SSL enable AD. It is written by someone who's obviously done this many times, and because of that is not a very good beginner's guide. Reading through all of the articles linked in the second reference will give you most of what you need. Still, I found that there was no substitute for building my own test AD domain controller and diving right in to the deep end of the pool. Your mileage may vary (please keep in mind that I first "cut my teeth" on Windows NT 3.51 in an enterprise environment over 10 years ago, and had an MCSE number in the low thousands). Even so, on my first go around, I installed Windows 2003 in a &lt;a href="http://www.vmware.com"&gt;VMware&lt;/a&gt; Server virtual machine. Happiness is being able to roll back to the last snapshot when bad things happen.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;br /&gt;You'll need a working AD environment, in which all services (especially DNS) are properly configured. You'll also need a 3rd party CA. In my case this was an OpenSSL CA I'd set up on a Linux box.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Generating the Certificate Request&lt;/strong&gt;&lt;br /&gt;To do this you need to follow the instructions set out in the first article cited above &lt;em&gt;exactly&lt;/em&gt;, but for one &lt;em&gt;major&lt;/em&gt; bit of misinformation.&lt;br /&gt;&lt;br /&gt;In describing the &lt;strong&gt;request.inf&lt;/strong&gt; file used with the &lt;code&gt;certreq&lt;/code&gt; utility to generate the request, the article adds a &lt;em&gt;caveat&lt;/em&gt; to the effect that some CA's might require additional elements in the "Subject" line -- such as e-mail address, organization name, etc. Adding these elements, however, will guarantee that you won't be able to successfully import the signed certificate. The reason? Because the local computer certificate store (a/k/a the "MY" certificate store) will not have any of these elements and so the distinguished name will not match that of the machine.&lt;br /&gt;&lt;br /&gt;Here is the actual &lt;strong&gt;request.inf&lt;/strong&gt; I used to generate my request. Note that the values I used for the different elements should be changed to match your environment:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; ;----------------- request.inf -----------------&lt;br /&gt;&lt;br /&gt;[Version]&lt;br /&gt;&lt;br /&gt;Signature="$Windows NT$&lt;br /&gt;&lt;br /&gt;[NewRequest]&lt;br /&gt;&lt;br /&gt;Subject = "CN=dc01.test.mydomain.com"&lt;br /&gt;KeySpec = 1&lt;br /&gt;KeyLength = 1024&lt;br /&gt;Exportable = TRUE&lt;br /&gt;MachineKeySet = TRUE&lt;br /&gt;SMIME = False&lt;br /&gt;PrivateKeyArchive = FALSE&lt;br /&gt;UserProtected = FALSE&lt;br /&gt;UseExistingKeySet = FALSE&lt;br /&gt;ProviderName = "Microsoft RSA SChannel Cryptographic Provider"&lt;br /&gt;ProviderType = 12&lt;br /&gt;RequestType = PKCS10&lt;br /&gt;KeyUsage = 0xa0&lt;br /&gt;&lt;br /&gt;[EnhancedKeyUsageExtension]&lt;br /&gt;&lt;br /&gt;OID=1.3.6.1.5.5.7.3.1 ; this is for Server Authentication&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Once you have your &lt;strong&gt;request.inf&lt;/strong&gt; file, you must run the following command to generate the request. Do this while logged in as the machine Administrator (cn=Administrator, cn=Users, dc=test, dc=domain,dc=com or  Administrator@test.domain.com):&lt;br /&gt;&lt;br /&gt;&lt;code&gt;certreq -new request.inf newreq.pem&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;The resulting request file, &lt;strong&gt;newreq.pem&lt;/strong&gt; can now be submitted to a 3rd party CA for signing.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Signing the Request&lt;/strong&gt;&lt;br /&gt;To sign the certificate request using OpenSSL, you need to transfer the file to where your "demoCA" has been set up. In my case this is at &lt;code&gt;/export/CA&lt;/code&gt; on a CentOS Linux box. I like the &lt;code&gt;CA&lt;/code&gt; script for this kind of work. It expects the request file to be named &lt;strong&gt;newreq.pem&lt;/strong&gt; by default. As root, I use the following command after changing to &lt;code&gt;/export/CA&lt;/code&gt; and making sure that &lt;strong&gt;newreq.pem&lt;/strong&gt; is located there:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/usr/share/ssl/misc/CA -sign&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;After supplying the CA's secret (password), I accept the defaults and the new signed certificate, by default named &lt;strong&gt;newcert.pem&lt;/strong&gt; is created alongside the &lt;strong&gt;newreq.pem&lt;/strong&gt; file. I usually rename the certificate file to something more unique, in this case &lt;strong&gt;dc01.cer&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Importing the Certificate(s)&lt;/strong&gt;&lt;br /&gt;A careful reader will notice I add a "(s)" to the end of this section title. That is because to make this all work you need to import into Active Directory not only your newly signed certificate, &lt;em&gt;but also the certificate for the CA that signed it&lt;/em&gt;. The procedure for importing these certificates differs. Make sure to do it exactly as described. You can use the Certificates Snap-in to import the server certificate, but it will not report some kinds of errors. To be safe, use the command line tool. First transfer the certificate to the DC filesystem, and then, while logged in as Administrator, run the following command:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;certreq -accept dc01.cer&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now add the Certificates (not the Certification Authority) Snap-in to your Administrative Tools menu (run &lt;code&gt;mmc&lt;/code&gt;, add the snap-in and save as a new console object), being careful to specify that it will manage certificates for the "Computer Account". Use the snap-in to verify that the new server certificate exists under &lt;code&gt;Certificates/Personal/Certificates&lt;/code&gt;. At this point the new certificate will be considered suspect, since the system will not recognize the signing CA. To cure this, transfer the CA's public certificate (without the key) to the DC filesystem and import it into the "Third Party Root Certificate Authorities" container using the Certificates Snap-in.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Effect and Verify the Change&lt;/strong&gt;&lt;br /&gt;Once the above steps are completed, reboot the DC system to make the change effective and enable the LDAPS (LDAP over SSL) listener on the DC. To verify that it is now  working, use the &lt;code&gt;ldp.exe&lt;/code&gt; from the &lt;em&gt;Windows Support Tools&lt;/em&gt; to connect to the local AD instance, by checking off "SSL" and changing the port number to 636.&lt;br /&gt;You can also test the SSL connection using the &lt;code&gt;ldapsearch&lt;/code&gt; utility. Before doing this, copy the CA's certificate to the local filesystem (I use a system-wide location of &lt;code&gt;/etc/ssl&lt;/code&gt;, you could also use the default &lt;code&gt;/etc/openldap/cacerts&lt;/code&gt;) and configure &lt;code&gt;ldap.conf&lt;/code&gt; to include the full path to this cert in the &lt;code&gt;TLS_CACERT&lt;/code&gt; directive (e.g. &lt;code&gt;TLS_CACERT /etc/ssl/myca.pem&lt;/code&gt;). Once you've disposed of these preliminaries, try the following command:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; ldapsearch -x -H ldaps://dc01.test.mydomain.com \&lt;br /&gt;-D "cn=administrator,cn=users,dc=test,dc=mydomain,dc=com -w mypass \&lt;br /&gt;-b "dc=example,dc=com" -s base "objectclass=*"&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-6110305175915665704?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6110305175915665704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6110305175915665704'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/06/ssl-enabling-active-directory.html' title='SSL Enabling Active Directory'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-4221954927345076311</id><published>2007-06-12T13:44:00.000-04:00</published><updated>2007-06-12T13:46:23.099-04:00</updated><title type='text'>LDAP over TLS with Net::LDAP</title><content type='html'>&lt;em&gt;This is an article from my old personal site.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Following is a simple script using LDAP over TLS (start_tls). Like LDAP over SSL (LDAPS), communications are done over a secure channel. In the case of TLS, however, those communications happen over port 389 instead of a dedicated secure port (LDAPS defaults to port 636). The "require" line is used to import host, userdn and password values from a separate configuration file.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;use Net::LDAP;&lt;br /&gt;&lt;br /&gt;our($dirHost,$dirUsr,$dirPass);&lt;br /&gt;&lt;br /&gt;require "../etc/config.inc";&lt;br /&gt;&lt;br /&gt;my $basedn = "dc=example,dc=com";&lt;br /&gt;my @attrs = qw(cn sn givenname uid mail);&lt;br /&gt;my $query = "(cn=*)";&lt;br /&gt;&lt;br /&gt;my $ldap = Net::LDAP-&gt; new( $dirHost );&lt;br /&gt;my $mesg = $ldap-&gt; start_tls(verify=&gt; 'require',&lt;br /&gt;       cafile =&gt; '/etc/ssl/cacert.pem'&lt;br /&gt;      );&lt;br /&gt;# die $mesg-&gt;error() if $mesg-&gt; code();&lt;br /&gt;&lt;br /&gt;$mesg = $ldap-&gt; bind($dirUsr, password =&gt; $dirPass);&lt;br /&gt;&lt;br /&gt;my $mesg = $ldap-&gt; search (&lt;br /&gt; base =&gt; $basedn,&lt;br /&gt; scope =&gt;'sub',&lt;br /&gt; filter =&gt; $query,&lt;br /&gt; attrs =&gt; \@attrs&lt;br /&gt; );&lt;br /&gt;&lt;br /&gt;while (my $entry = $mesg-&gt; shift_entry()) {&lt;br /&gt;&lt;br /&gt;$entry-&gt; dump;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$ldap-&gt; unbind;&lt;br /&gt;&lt;br /&gt;__END__;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-4221954927345076311?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4221954927345076311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4221954927345076311'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/06/ldap-over-tls-with-netldap.html' title='LDAP over TLS with Net::LDAP'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-6247484291855352580</id><published>2007-06-08T16:18:00.000-04:00</published><updated>2007-06-08T16:32:35.094-04:00</updated><title type='text'>checkfields.pl</title><content type='html'>This is one of those works-in-progress that may have some use to others, so I'll share it here.&lt;br /&gt;&lt;br /&gt;Oracle DBA's called this morning wanting to know if the length of any of the fields in a delimited file I send them changed (got longer). Told them I had no idea. LDAP doesn't care about field length. Makes it easier to use as a white pages platform if you don't have to keep track of how many characters are in the surname in each entry.&lt;br /&gt;&lt;br /&gt;Anyway, because I'm such a nice guy I told them I'd go find out what the largest number of characters were in each field of the file.&lt;br /&gt;&lt;br /&gt;Here's another of my (infamously) simplistic Perl scripts that I used to get the info:&lt;br /&gt;&lt;blockquote&gt;&lt;/code&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;# checkfields.pl Audit a delimited LDAP feed&lt;br /&gt;# Read in pipe-delimited feed, count number of chars in each field to get highest&lt;br /&gt;# total. For use in reporting number of chars that import needs to&lt;br /&gt;# accomodate for each field.&lt;br /&gt;&lt;br /&gt;use Text::ParseWords;&lt;br /&gt;&lt;br /&gt;my $HOME = $ENV{'HOME'};&lt;br /&gt;&lt;br /&gt;my $feedfile = "$HOME/tmp/ldap.dat";&lt;br /&gt;my %wholefeed;&lt;br /&gt;&lt;br /&gt;my $totfields;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;print "Checking $feedfile\n";&lt;br /&gt;&lt;br /&gt;open FH, "&lt;$feedfile" or die $!;&lt;br /&gt;&lt;br /&gt;while (&amp;lt;FH&amp;gt;) {&lt;br /&gt;&lt;br /&gt; my @line = &amp;parse_line('\|',0,$_);&lt;br /&gt;&lt;br /&gt; $totfields = scalar(@line);&lt;br /&gt;&lt;br /&gt; my $fieldct =0;&lt;br /&gt;&lt;br /&gt; my $index = @line[0];&lt;br /&gt;&lt;br /&gt; foreach my $field(@line) {&lt;br /&gt;&lt;br /&gt;  my $fieldno = $fieldct++;&lt;br /&gt;  my $newlen = length($field);&lt;br /&gt;&lt;br /&gt;  my $oldlen = $wholefeed{$fieldno};&lt;br /&gt; &lt;br /&gt;  if ($newlen &amp;gt;$oldlen) {&lt;br /&gt;   $wholefeed{$fieldno} = $newlen;&lt;br /&gt;  &lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;print "Total Fields: $totfields\n";&lt;br /&gt;&lt;br /&gt;print "Field,Chars\n";&lt;br /&gt;&lt;br /&gt;my $count;&lt;br /&gt;&lt;br /&gt;for ($count =0; $count &amp;lt;$totfields; $count++) {&lt;br /&gt; print $count, ",", $wholefeed{$count}, "\n";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;__END__;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-6247484291855352580?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6247484291855352580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6247484291855352580'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/06/checkfieldspl.html' title='checkfields.pl'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-7238310328288574436</id><published>2007-05-30T12:11:00.001-04:00</published><updated>2007-05-30T12:22:59.329-04:00</updated><title type='text'>Let's get a real database</title><content type='html'>I just had to share &lt;a href="http://xooglers.blogspot.com/2005/12/lets-get-real-database.html"&gt;this&lt;/a&gt; old post from the &lt;a href="http://xooglers.blogspot.com"&gt;Xooglers&lt;/a&gt; blog about the evolution of &lt;a href="http://www.google.com"&gt;Google's&lt;/a&gt; &lt;a href="http://adwords.google.com/select/Login"&gt;AdWords&lt;/a&gt; application. Here are my favortie snippets:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;AdWords was built using the MySQL database, which is open-source and therefore available for free. It is by now also nearly as full-featured as the best commercial databases, but back in 2000 this was not the case. MySQL was quite a capable system, but missing a few (what some would consider basic) features. These missing features were obviously not a show-stopper, as we managed to get AdWords to work without them, but in a few cases it did take some extra programming to work around one of these missing features. On the plus side, MySQL was fast and reliable and, as I have already noted, free.&lt;br /&gt;&lt;center&gt;***&lt;/center&gt;&lt;br /&gt;After AdWords launched, Jane, the ads group manager, decided that now would be a good time to switch over to a "real" database. "Real" is one of those words that Doug ought to add to his list of words. It means "expensive".&lt;br /&gt;&lt;center&gt;***&lt;/center&gt;&lt;br /&gt;We finally decided to go with a commercial database (I won't say which one) over the objections of a number of engineers, including myself.&lt;br /&gt;&lt;center&gt;***&lt;/center&gt;&lt;br /&gt;To make a long story short, it was an unmitigated disaster. The new system was slower than molasses in February. Some heroic optimization efforts eventually produced acceptable performance, but it was never as good as the old MySQL-based system had been.&lt;br /&gt;&lt;center&gt;***&lt;/center&gt;&lt;br /&gt;It was still that way when I left Google in October of 2001, but I have heard through the grapevine that they eventually went back to MySQL.&lt;br /&gt;&lt;center&gt;***&lt;/center&gt;&lt;br /&gt;The moral of the story is that sometimes, and in particular with free software, you get more than what you pay for. There are a lot of companies out there paying dearly for commercial databases (and operating systems for that matter). As far as I'm concerned they might as well be flushing that money down the toilet. Actually, they might be better off. We certainly would have been.&lt;br /&gt;&lt;center&gt;***&lt;/center&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Amen.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-7238310328288574436?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/7238310328288574436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/7238310328288574436'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/05/lets-get-real-database.html' title='Let&apos;s get a real database'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-6150044404016335898</id><published>2007-05-29T12:27:00.000-04:00</published><updated>2007-06-04T11:51:01.456-04:00</updated><title type='text'>OpenLDAP Redux</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_enG0JqsTrkM/RmQ03yLLqwI/AAAAAAAAAEM/tabxAZCnVJg/s1600-h/LDAPworm.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_enG0JqsTrkM/RmQ03yLLqwI/AAAAAAAAAEM/tabxAZCnVJg/s320/LDAPworm.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5072237213292145410" /&gt;&lt;/a&gt;&lt;br /&gt;After several months in "full immersion" mode with Fedora Directory, I just began reconfiguring my home lab network to use OpenLDAP as it's main directory server again. This time around I'm going to also try integrating OpenLDAP as the backend for a new kerberos authentication infrastructure to service both my Linux and Windows machines. It will be interesting to see how easy (or hard) it is to also integrate some of the test JBoss stuff I have out there that's currently working with FDS.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-6150044404016335898?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6150044404016335898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6150044404016335898'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/05/openldap-redux.html' title='OpenLDAP Redux'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_enG0JqsTrkM/RmQ03yLLqwI/AAAAAAAAAEM/tabxAZCnVJg/s72-c/LDAPworm.gif' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-2925460230131597335</id><published>2007-05-29T12:21:00.001-04:00</published><updated>2007-05-29T12:27:40.711-04:00</updated><title type='text'>OpenLDAP Proxy</title><content type='html'>Surfing various LDAP related mail lists over the weekend I came upon post after post that revealed the great extent to which OpenLDAP has become a common solution as an LDAP proxy. That intrigued me because I've recently been thinking again about both high-availability and data integration issues in which OpenLDAP's proxy and meta backends could provide an answer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-2925460230131597335?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/2925460230131597335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/2925460230131597335'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/05/openldap-proxy.html' title='OpenLDAP Proxy'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-4429860729674974108</id><published>2007-05-29T11:24:00.000-04:00</published><updated>2007-08-15T15:10:15.931-04:00</updated><title type='text'>An IT Infrastructure for the Rest of Us</title><content type='html'>Because I work in a large Enterprise environment all the time, it's sometimes easy to forget that the kind of heavyweight infrastructure I'm used to isn't something that &lt;em&gt;most&lt;/em&gt; people can afford to operate. In fact, the cost of application stacks like those offered by Oracle, IBM or Sun (with "honorable mention" to SAP and others), goes way beyond the license fees charged. Deploying and maintaining those environments also requires a significant investment in time and human resources that is not only beyond the means of most small to mid-sized businesses, but would actually overwhelm them and distract them from whatever their actual business mission is.&lt;br /&gt;&lt;br /&gt;From my limited knowledge of what's actually out there, I see two basic options for "the rest of us", companies and firms that aren't on the Fortune 500 list. Microsoft, or open source. Microsoft's cost to benefit numbers are actually pretty good for small scale deployments. Their technology stack is also mostly complete. Here in America they already "own" the desktop, and so building out using their server products makes alot of sense for many businesses. Of course the problem with Microsoft is that basing your infrastructure on their stack will ultimately result in &lt;em&gt;their&lt;/em&gt; "owning" &lt;em&gt;you&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;Until a few years ago open source couldn't compete with Microsoft because there weren't any vendors who could deliver an integrated application stack to serve the various requirements of this class of businesses. While IBM, in particular, eagerly integrated open source software like Linux and Apache into their solutions, the cost for both licensing and human resources to deploy and maintain kept them outside the reach of most small and mid-sized businesses.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_enG0JqsTrkM/RmQ0SyLLqvI/AAAAAAAAAEE/KNY24mCd4og/s1600-h/logo_rh_home.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_enG0JqsTrkM/RmQ0SyLLqvI/AAAAAAAAAEE/KNY24mCd4og/s320/logo_rh_home.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5072236577636985586" /&gt;&lt;/a&gt;&lt;br /&gt;I think &lt;a href="http://www.redhat.com"&gt;Red Hat&lt;/a&gt; changed things dramatically with their acquisition of JBoss and improvements to their operating system (as well as accompanying software) in recent years. Red Hat could be doing more in the area of helping small business, especially, learn how to use technology more effectively than the Microsoft Windows/Office paradigm that that's been dominant for the last two decades. Red Hat has been gaining lately, however, by branding solutions that they've developed with partners to serve different business segments like the &lt;a href="http://www.redhat.com/solutions/healthcare/platform.html"&gt;Red Hat Enterprise Health Care Platform&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;What interests me about the Red Hat stack as it exists today is that so much of it is under-the-covers pure open source that's available elsewhere. The thing that makes Red Hat's distribution of this stuff different is their engineering improvements, particularly in the area of manageability. For example, open source kerberos gets high marks as a proven authentication framework that is notoriously difficult to implement and integrate with the rest of an infrastructure. Red Hat's "re-spin" of kerberos in it's Enterprise Linux product includes integration points with common services like the Apache HTTP server and the OpenLDAP directory. With what Red Hat gives me in a few basic Enterprise Linux subscriptions I can now build an entire infrastructure that works as well if not better than what you can get from any of the vendors who are focused on Enterprise sales at a fraction of the cost -- and I can do it without the proprietary "lock-in" that would result from using Microsoft.&lt;br /&gt;&lt;br /&gt;Don't even get me started on the galaxy of Perl and PHP modules that are available as rpms, and how well integrated these are with Red Hat's Apache and MySQL (now finally at v5 after an excruciating number of years stuck in v3) builds.&lt;br /&gt;&lt;br /&gt;Although I continue to believe that the price points for Red Hat subscriptions need adjustment in a downward direction, I recognize that this is an easy opinion for someone to have who isn't trying to keep up with the exponential increase in the demand for their services that Red Hat faces. Hopefully they will be able to properly balance profits with reinvestment so that the ultimate cost of a subscription will continue to reflect the real value provided to their customers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-4429860729674974108?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4429860729674974108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4429860729674974108'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/05/it-infrastructure-for-rest-of-us.html' title='An IT Infrastructure for the Rest of Us'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_enG0JqsTrkM/RmQ0SyLLqvI/AAAAAAAAAEE/KNY24mCd4og/s72-c/logo_rh_home.png' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-3187114031679609587</id><published>2007-05-21T15:52:00.002-04:00</published><updated>2007-06-08T16:47:49.439-04:00</updated><title type='text'>ssh tunnel to your directory</title><content type='html'>This is a little trick I learned out of self-preservation. While I have the utmost respect for my brothers in network security, there comes a time in every directory admin's life when the IT bureaucracy (the "hidden" 8th layer in the OSI Model) causes a collision between your need for access and change control lead times.&lt;br /&gt;&lt;br /&gt;It is for such a time that I believe ssh tunneling was invented.&lt;br /&gt;&lt;br /&gt;In a nutshell, if you can reach the remote box over ssh (TCP port 22), then you can set up a "tunnel" between your workstation and that remote box to connect with whatever port you want over there.&lt;br /&gt;&lt;br /&gt;Here's the magic command,&lt;br /&gt;&lt;br /&gt;&lt;code&gt;ssh -L 1389:remotehostname:389 remoteuserid@remotehostname&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Basically, that's it. Now you can connect to the remote directory server with something like,&lt;br /&gt;&lt;br /&gt;&lt;code&gt;ldapsearch -x -h localhost -p 1389 -b "" -s base "objectclass=*"&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;What you've done is assign port 1389 on your workstation as your local end of the tunnel that connects to port 389 on the remote box.&lt;br /&gt;&lt;br /&gt;This works with most ssh setups because by default sshd, the ssh service daemon, allows TCP port forwarding. That can be changed by a particularly, well, security-conscious, security admin, but rarely is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-3187114031679609587?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/3187114031679609587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/3187114031679609587'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/05/ssh-tunnel-to-your-directory_21.html' title='ssh tunnel to your directory'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-8990563620163858833</id><published>2007-05-04T12:50:00.000-04:00</published><updated>2007-05-04T12:56:03.539-04:00</updated><title type='text'>Fedora Directory init script</title><content type='html'>Here's a very basic example, ripped off from Red Hat's script for OpenLDAP. After creating this in /etc/init.d (I usually call the file "nsslapd"), add and enable it using chkconfig.&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;# processname: ns-slapd&lt;br /&gt;# nsslapd  Start and stop Fedora Directory&lt;br /&gt;# chkconfig: - 38 62&lt;br /&gt;# description: Script to control Fedora Directory server&lt;br /&gt;# Derived from /etc/init.d/ldap, Copyright by Red Hat, Inc.&lt;br /&gt;&lt;br /&gt;DSHOME=/u01/app/sun/directory52&lt;br /&gt;HOST=myhost&lt;br /&gt;function start() {&lt;br /&gt;        # Start daemons&lt;br /&gt;        $DSHOME/slapd-$HOST/start-slapd&lt;br /&gt;        $DSHOME/start-admin&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function stop() {&lt;br /&gt;        # Stop daemons.&lt;br /&gt;        $DSHOME/stop-admin&lt;br /&gt;        $DSHOME/slapd-$HOST/stop-slapd&lt;br /&gt;}&lt;br /&gt;# See how we were called.&lt;br /&gt;case "$1" in&lt;br /&gt;    start)&lt;br /&gt;        start&lt;br /&gt;        ;;&lt;br /&gt;    stop)&lt;br /&gt;        stop&lt;br /&gt;        ;;&lt;br /&gt;    restart)&lt;br /&gt;        stop&lt;br /&gt;        start&lt;br /&gt;        ;;&lt;br /&gt;esac&lt;br /&gt;&lt;/pre&gt;&lt;/conf&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-8990563620163858833?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/8990563620163858833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/8990563620163858833'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/05/fedora-directory-init-script.html' title='Fedora Directory init script'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-3977533178425315060</id><published>2007-04-26T02:29:00.000-04:00</published><updated>2007-06-07T15:11:11.366-04:00</updated><title type='text'>Oracle E-Business Suite 11i Links</title><content type='html'>Yeah, I know this isn't directly LDAP-related -- but sometimes it helps to know something about the apps your ID management infrastructure is protecting.&lt;br /&gt;&lt;br /&gt;Anyway, I'm now well into the design phase of my company's ERP implementation (or should I say, (plural) &lt;em&gt;implementations&lt;/em&gt;, which currently assumes we'll be going with 11i apps.&lt;br /&gt;&lt;br /&gt;Here are some links to stuff that looks like it will be useful going forward:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://becomeappsdba.blogspot.com"&gt;Become an Oracle Apps DBA&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oracleappsblog.com/index.php"&gt;Oracle Apps Blog&lt;/a&gt;&lt;br /&gt;&lt;a href="http://11idba.blogspot.com/"&gt;Shayam the Apps DBA&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.appsdbablog.com/"&gt;Oracle Applications DBA Blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;... and let's not forget the &lt;em&gt;official&lt;/em&gt; Oracle doc:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download-east.oracle.com/docs/cd/B25516_16/current/html/docset.html"&gt;Oracle 11i Virtual Documentation Library&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-3977533178425315060?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/3977533178425315060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/3977533178425315060'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/04/oracle-e-business-suite-11i-links.html' title='Oracle E-Business Suite 11i Links'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-2204553312202023296</id><published>2007-04-24T13:52:00.000-04:00</published><updated>2007-06-08T16:51:38.400-04:00</updated><title type='text'>init script for Oracle infrastructure</title><content type='html'>I went crazy the other day looking for this, sure that I'd posted it somewhere. I was wrong, I had not. This script should be copied into /etc/init.d on a Red Hat Enterprise/CentOS system, given execute permissions and then enabled using chkconfig. This is a companion to &lt;a href="http://onemoretech.blogspot.com/2007/03/oracle-db-init-script-for-red-hat.html"&gt;another&lt;/a&gt; script I did that starts/stops the underlying database (this script still needs some code to test that the DB is live before it tries to start everything up, I'm &lt;a href="http://onemoretech.blogspot.com/2007/06/script-to-check-on-oracle-db.html"&gt;working&lt;/a&gt; on that...).&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;#&lt;br /&gt;# chkconfig: 29 99 1&lt;br /&gt;# description: init script to start/stop oracle AS 10g&lt;br /&gt;#&lt;br /&gt;#&lt;br /&gt;# match these values to your environment:&lt;br /&gt;export ORACLE_HOME=/u01/app/orainfra/product/10.1.4/inft&lt;br /&gt;export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/opmn/bin:$PATH&lt;br /&gt;export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH&lt;br /&gt;export JAVA_HOME=$ORACLE_HOME/jdk&lt;br /&gt;export ORACLE_SID=inft&lt;br /&gt;export ORACLE_USER=orainfra&lt;br /&gt;&lt;br /&gt;# see how we are called:&lt;br /&gt;case $1 in&lt;br /&gt;    start)&lt;br /&gt;    echo "Starting Oracle AS ..."&lt;br /&gt;    su - ORACLE_USER &amp;lt&amp;lt EOS&lt;br /&gt;    opmnctl startall&lt;br /&gt;    emctl start iasconsole&lt;br /&gt;&lt;br /&gt;EOS&lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;    stop)&lt;br /&gt;    echo "Stopping Oracle AS ..."&lt;br /&gt;    su - $ORACLE_USER &amp;lt&amp;lt EOS&lt;br /&gt;    emctl stop iasconsole&lt;br /&gt;    opmnctl stopall&lt;br /&gt;&lt;br /&gt;EOS&lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;    *)&lt;br /&gt;    echo "Usage: $0 {start|stop}"&lt;br /&gt;    ;;&lt;br /&gt;esac&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-2204553312202023296?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/2204553312202023296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/2204553312202023296'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/04/init-script-for-oracle-infrastructure.html' title='init script for Oracle infrastructure'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-6273180807706032851</id><published>2007-04-20T12:21:00.000-04:00</published><updated>2007-04-20T12:24:41.939-04:00</updated><title type='text'>Using an Existing Database for Oracle IDM</title><content type='html'>Oracle Identity Management can use an existing Oracle 10g database for it's Metadata Repository.&lt;br /&gt;&lt;br /&gt;The instructions are in the &lt;a href="http://download-east.oracle.com/docs/cd/B28196_01/repca.1014/b28214/toc.htm"&gt;Oracle Application Server Metadata Repository Creation Assistant User's Guide&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-6273180807706032851?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6273180807706032851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6273180807706032851'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/04/using-existing-database-for-oracle-idm.html' title='Using an Existing Database for Oracle IDM'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-1027248253107913509</id><published>2007-04-09T15:50:00.000-04:00</published><updated>2007-04-09T16:07:58.454-04:00</updated><title type='text'>Oracle Identity Management Resource Library</title><content type='html'>The &lt;a href="http://www.oracle.com/products/middleware/identity-management/resource-library.html"&gt;Oracle Identity Management Resource Library&lt;/a&gt; has some very interesting and useful stuff that warrants attention. It's all, of course, geared to sell you Oracle product, and therefore is for the most part very "high level". Having said that, the issues and strategies presented should resonate with anyone who has struggled with the mechanics of IDM (there, another acronym -- acronyms are good, they usually lead to higher salaries, in direct proportion to the obscurity of the acronym).&lt;br /&gt;&lt;br /&gt;Give a listen (while you work, the slides can safely be ignored) to some of the webcasts, especially the customer discussion panel. If your management is impressed by such things, you might also want to grab the latest Gartner "Magic Quadrant" and some of the other analysts reports there (take what you read there with a grain of salt, most of these "experts" wouldn't know a code 27 from a code 28 to save their own lives -- which explains why many commercial products don't either).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-1027248253107913509?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/1027248253107913509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/1027248253107913509'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/04/oracle-identity-management-resource.html' title='Oracle Identity Management Resource Library'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-1409466184658228482</id><published>2007-03-29T11:00:00.000-04:00</published><updated>2007-03-29T11:04:21.000-04:00</updated><title type='text'>Managing LDAP book list</title><content type='html'>I've got a &lt;a href="http://www.amazon.com/gp/help/customer/display.html/104-7417779-7567143?ie=UTF8&amp;nodeId=14279651"&gt;Listmania &lt;/a&gt; list on &lt;a href="http://www.amazon.com"&gt;Amazon&lt;/a&gt; called &lt;a href="http://www.amazon.com/Managing-LDAP/lm/SZLRC4NCPTMZ/ref=cm_lm_byauthor_title_full/104-7417779-7567143"&gt;"Managing LDAP"&lt;/a&gt;, my picks for books that every directory admin should have on their bookshelf.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-1409466184658228482?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/1409466184658228482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/1409466184658228482'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/03/managing-ldap-book-list.html' title='Managing LDAP book list'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-7860576255628651501</id><published>2007-03-26T16:50:00.000-04:00</published><updated>2007-03-26T17:33:47.731-04:00</updated><title type='text'>Referential Integrity</title><content type='html'>Referential integrity is one of those essential functions that every directory needs, but on whose implementation there is no agreement among directory product vendors. The major use of referential integrity is to make sure that the user dns listed in groups actually exist on the directory. Without referential integrity a user could be deleted but the reference to their entry in a particular group (say, "cn=Administrators"), would not. This would be characterized as "A BAD THING (TM)" by most directory admins.&lt;br /&gt;&lt;br /&gt;Recognizing the need for such a feature, Netscape included a "referential integrity postoperation plugin" in all of it's directory products from at least iPlanet 4. This plugin has survived to this day in both the latest Sun and Red Hat/Fedora Directory products (see the Red Hat &lt;a href="https://www.redhat.com/docs/manuals/dir-server/ag/7.1/modify.html#1132363"&gt;Directory Administrator's Guide&lt;/a&gt;). It is disabled by default, but preconfigured to check on uniquemember and member. It can be enabled and re-configured through the GUI directory console or by editing dse.ldif under the directory server root. Once enabled, the plugin is invoked whenever an entry is deleted from the directory. You do take a performance hit with this feature turned on, which is probably the reason for shipping it disabled (you wouldn't want unnecessarily hurt benchmark performance, never mind how unreal-world the shipping configuration is -- kudos to the Fedora Directory team for finally ridding their product of the &lt;a href="http://directory.fedora.redhat.com/wiki/Database_Architecture"&gt;allidsthreshhold&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Oracle also provides a referential integrity solution. The instructions for enabling and configuring it are contained in the &lt;a href="http://download-east.oracle.com/docs/cd/B28196_01/idmanage.1014/b15991/ref_integ.htm#BCGECHCH"&gt;Oracle   Internet Directory Administrator's Guide&lt;/a&gt;. The procedure detailed there steps you through the process of editing and compiling a Java object and modifying directory entries to enable the feature. It then shows how to edit a script file and run it against the underlying Oracle database. Finally, the manual recommends running the process at frequent intervals via cron or some other scheduler.&lt;br /&gt;&lt;br /&gt;Comparing this to the Netscape/Red Hat/Fedora facility, the first word that came to mind was:&lt;br /&gt;&lt;br /&gt;P-R-I-M-A-T-I-V-E&lt;br /&gt;&lt;br /&gt;and really illustrates the difference in between the two product architectures. The Netscape family directories were optimized over time for use in building flexible directory services, built by directory developers and admins for directory developers and admins. The roots of the Oracle product are clearly in Oracle's relational (object) database product. At almost every turn you can see this legacy. Having to compile some java code, edit a script file and run a PL-SQL command to enforce referential integrity is just one of the more obvious examples.&lt;br /&gt;&lt;br /&gt;Of course, to be fair, at least Oracle provides a solution. OpenLDAP doesn't. Referential integrity isn't even on their roadmap. Microsoft actually seems to do the best at this, referential integrity for things like groups is integral to the base product (and is probably one reason it doesn't perform as well as the default Netscape or Oracle configurations on delete and write operations).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-7860576255628651501?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/7860576255628651501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/7860576255628651501'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/03/referential-integrity.html' title='Referential Integrity'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-8402206913309749360</id><published>2007-03-21T16:56:00.000-04:00</published><updated>2007-03-21T17:23:35.645-04:00</updated><title type='text'>Checking Active Directory for Duplicate E-Mail Addresses</title><content type='html'>Here's an application using Net::LDAP's module for Simple Paged Results Control.&lt;br /&gt;&lt;br /&gt;Anyone whose environment depends on Microsoft Exchange for messaging knows what a pain duplicate e-mail addresses can be. Following is a script I wrote to walk the Active Directory tree and do a quick lookup for duplicate addresses. It's kind of raw, but it works. Uses a config file for host name, bind dn and password. Iterates through an array of the target containers specified. In this particular case we've got a separate container for what used to be known as "custom recipients", users who don't log into the domain but whose e-mail addresses we want to be searchable in the Exchange GAL. The script only reports on exact matches on the value of the 'mail' attribute in entries other than the current subject.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!perl&lt;br /&gt;# Check Active Directory for duplicate e-mail addresses.&lt;br /&gt;# Created 03/12/07 by P Lembo&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use Net::LDAP;&lt;br /&gt;use Net::LDAP::Entry;&lt;br /&gt;use Net::LDAP::Control::Paged;&lt;br /&gt;use Net::LDAP::Constant qw( LDAP_CONTROL_PAGED );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;our($adHost,$adUsr,$adPass);&lt;br /&gt;require "c:/apps/etc/app.conf";&lt;br /&gt;my $errfile = "../addupchk.log";&lt;br /&gt;open LOGZ, "&gt;$errfile" or die $!; &lt;br /&gt;&lt;br /&gt;my $count=0;&lt;br /&gt;my $found=0;&lt;br /&gt;&lt;br /&gt;my $contactbase = "ou=addressbook,dc=mydomain,dc=mycompany,dc=com";&lt;br /&gt;my $adroot = "dc=mycdomain,dc=mycompany,dc=com";&lt;br /&gt;my @allbases = ( "ou=users,dc=mydomain,dc=mycompany,dc=com",&lt;br /&gt;     "ou=others,dc=mydomain,dc=mycompany,dc=com",&lt;br /&gt;     "ou=addressbook,dc=mydomain,dc=mycompany,dc=com",&lt;br /&gt;     );&lt;br /&gt;     &lt;br /&gt;my $query = "(mail=*)";&lt;br /&gt;my @attrs = qw(mail displayname cn);&lt;br /&gt;my $timestamp = localtime();&lt;br /&gt;print LOGZ "$timestamp\tBegin Checking AD for duplicate e-mails\n";&lt;br /&gt;&lt;br /&gt;my $ldap = Net::LDAP-&gt;new($adHost) or die $!;&lt;br /&gt;my $mesg = $ldap-&gt;bind($adUsr, password =&gt;$adPass);&lt;br /&gt;&lt;br /&gt;foreach my $base(@allbases) {&lt;br /&gt;&lt;br /&gt; my $page = Net::LDAP::Control::Paged-&gt;new( size =&gt; 1000 ) or die $!;&lt;br /&gt; my @args = ( base =&gt; $base,&lt;br /&gt;           scope =&gt; 'sub',&lt;br /&gt;           filter =&gt; $query,&lt;br /&gt;           attrs =&gt; \@attrs,&lt;br /&gt;           control =&gt; [ $page ],&lt;br /&gt;      );&lt;br /&gt;   &lt;br /&gt; my $cookie;&lt;br /&gt; &lt;br /&gt; while (1) {&lt;br /&gt; &lt;br /&gt;  $mesg = $ldap-&gt;search ( @args ) or die $!;&lt;br /&gt;   while (my $entry = $mesg-&gt;shift_entry()) {&lt;br /&gt;      my $entrydn = $entry-&gt;dn();&lt;br /&gt;      my $mail = $entry-&gt;get_value('mail');&lt;br /&gt;      my $displayname = $entry-&gt;get_value('displayname');&lt;br /&gt;      my $cn = $entry-&gt;get_value('cn');&lt;br /&gt;  &lt;br /&gt;      if($mail !~ /.+\@.+/g) {&lt;br /&gt;      print "$entrydn not mail-enabled\n";&lt;br /&gt;      }&lt;br /&gt;      else {&lt;br /&gt;         my @hits = dup_search($entrydn,$mail,$displayname,$cn);&lt;br /&gt;         foreach my $hit(@hits) {&lt;br /&gt;             if($hit =~ /$entrydn/) {&lt;br /&gt;             # Same entry, move on&lt;br /&gt;             }&lt;br /&gt;             else {&lt;br /&gt;                 print "\t$displayname $entrydn mail same as\n";&lt;br /&gt;                 print "\t$hit\n\n";&lt;br /&gt;                 print LOGZ "\t$displayname $entrydn mail duplicate found\n";&lt;br /&gt;                 print LOGZ "\t$hit should be deleted from contacts\n\n";&lt;br /&gt;   &lt;br /&gt;                 $count++;&lt;br /&gt;             }&lt;br /&gt;        }&lt;br /&gt;      } # else&lt;br /&gt;  } # while&lt;br /&gt;  my ($resp) = $mesg-&gt;control(LDAP_CONTROL_PAGED) or last;&lt;br /&gt;  $cookie = $resp-&gt;cookie or last;&lt;br /&gt;  $page-&gt;cookie($cookie);&lt;br /&gt; } # while (1)&lt;br /&gt; &lt;br /&gt; if ($cookie) {&lt;br /&gt;  $page-&gt;cookie($cookie);&lt;br /&gt;  $page-&gt;size(0);&lt;br /&gt;  $ldap-&gt;search( @args );&lt;br /&gt; }&lt;br /&gt;} # foreach&lt;br /&gt;close FH;&lt;br /&gt;$ldap-&gt;unbind;&lt;br /&gt;&lt;br /&gt;$timestamp = localtime();&lt;br /&gt;print "Number of hits: $count\n";&lt;br /&gt;print LOGZ "$timestamp\tChecking completed\n";&lt;br /&gt;close LOGZ;&lt;br /&gt;&lt;br /&gt;sub dup_search {&lt;br /&gt;&lt;br /&gt; my $addn = @_[0];&lt;br /&gt; my $admail = @_[1];&lt;br /&gt; my $displayname = @_[2];&lt;br /&gt; my $cn = @_[3];&lt;br /&gt; print "$addn $admail\n";&lt;br /&gt; my @matchdns;&lt;br /&gt; my $nldap = Net::LDAP-&gt;new($adHost) or die $!;&lt;br /&gt; my $nmesg = $nldap-&gt;bind($adUsr, password =&gt;$adPass);&lt;br /&gt; my $nquery = "(mail=$admail)";&lt;br /&gt; my @nattrs = qw(mail displayname cn);&lt;br /&gt; my $npage = Net::LDAP::Control::Paged-&gt;new( size =&gt; 1000 ) or die $!;&lt;br /&gt; &lt;br /&gt; my @nargs = ( base =&gt; $contactbase,&lt;br /&gt;         scope =&gt; 'sub',&lt;br /&gt;         filter =&gt; $nquery,&lt;br /&gt;         attrs =&gt; \@nattrs,&lt;br /&gt;         control =&gt; [ $npage ],&lt;br /&gt;     );&lt;br /&gt; &lt;br /&gt; my $ncookie;&lt;br /&gt; &lt;br /&gt; while (1) {&lt;br /&gt;  $nmesg = $nldap-&gt;search ( @nargs ) or die $!;&lt;br /&gt;   while (my $nentry = $nmesg-&gt;shift_entry()) {&lt;br /&gt;   my $nentrydn = $nentry-&gt;dn();&lt;br /&gt;   my $ndisplayname = $nentry-&gt;get_value('displayname');&lt;br /&gt;   my $acn = $nentry-&gt;get_value('cn');&lt;br /&gt;   push @matchdns, $nentrydn;&lt;br /&gt;  }&lt;br /&gt;  my ($nresp) = $nmesg-&gt;control(LDAP_CONTROL_PAGED) or last;&lt;br /&gt;  $ncookie = $nresp-&gt;cookie or last;&lt;br /&gt;  $npage-&gt;cookie($ncookie);&lt;br /&gt; }&lt;br /&gt; if ($ncookie) {&lt;br /&gt;   $npage-&gt;cookie($ncookie);&lt;br /&gt;   $npage-&gt;size(0);&lt;br /&gt;   $nldap-&gt;search( @nargs );&lt;br /&gt; }&lt;br /&gt;  return @matchdns;&lt;br /&gt;  $nldap-&gt;unbind;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;__END__;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-8402206913309749360?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/8402206913309749360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/8402206913309749360'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/03/checking-active-directory-for-duplicate.html' title='Checking Active Directory for Duplicate E-Mail Addresses'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-1411715371746852097</id><published>2007-03-21T15:50:00.000-04:00</published><updated>2007-03-29T09:26:31.724-04:00</updated><title type='text'>DST Problem on OIM Release 3 Install</title><content type='html'>Last couple of days was frustrated in trying to install Oracle Identity Management Release 3 in a VM on my work machine. Since at the OS level it's identical to my home system, I figured there'd be no problem following &lt;a href="http://eldapo.blogspot.com/2007/03/installing-oracle-oimoif-10g-r3.html"&gt;my&lt;/a&gt; expert install procedure (written during my last install on March 9 of this year).&lt;br /&gt;&lt;br /&gt;Ha! Did 3 abortive installs, with a trip home in between to re-download and re-burn the CDs (and copy them from disk mounted inside the VM -- I try to be kind to my fellow employees in the bandwidth poor sales branch I work out of), all with the result that dbconsole failed to come up during setup. On the fourth attempt I let the installer complete and then tried starting dbconsole. Clocked.&lt;br /&gt;&lt;br /&gt;Damn. DST. Freaking H.R. 6, the &lt;a href="http://thomas.loc.gov/cgi-bin/query/z?c109:H.R.6.ENR:"&gt;"Energy Policy Act of 2005"&lt;/a&gt;. Signed into law on &lt;strong&gt;August 8, 2005&lt;/strong&gt;. Thank you SO much 109th Congress for wasting my time and my employer's money by changing a 20 year old standard that's been burned into every damn computer system on the planet.&lt;br /&gt;&lt;br /&gt;So I shut everything down, grabbed patches 5865568 and 5632264 (READ THE DIRECTIONS!), did the "opatch apply" thing for each and, of course, everything now works.&lt;br /&gt;&lt;br /&gt;I'm still waiting for someone to explain to me why it took almost every commercial software vendor &lt;strong&gt;two freaking years&lt;/strong&gt; to come out with patches incorporating the shift from April 1 to March 11 into their products, and why &lt;strong&gt;any&lt;/strong&gt; of them still have bits for download -- especially distribution disks -- that don't include it.&lt;br /&gt;&lt;br /&gt;Morons.&lt;br /&gt;&lt;br /&gt;For those of you out there who haven't been paying attention, below I've spelled out what the 2007 dates for DST &lt;em&gt;would have been&lt;/em&gt; here in the U.S., and what &lt;em&gt;the law now requires&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Would be:&lt;/strong&gt; April 1 - October 28&lt;br /&gt;&lt;strong&gt;Is now:&lt;/strong&gt; March 11 - November 4&lt;br /&gt;&lt;br /&gt;So if anyone out there thought they were clever and took the short cut of just manually advancing their clocks, they're going to be in for a surprise on April 1. And on October 28.&lt;br /&gt;&lt;br /&gt;You have been warned.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-1411715371746852097?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/1411715371746852097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/1411715371746852097'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/03/dst-problem-on-oim-release-3-install.html' title='DST Problem on OIM Release 3 Install'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-9135971905643585586</id><published>2007-03-13T17:24:00.000-04:00</published><updated>2007-03-13T17:38:02.186-04:00</updated><title type='text'>Simple Paged Results with Net::LDAP</title><content type='html'>Not sure if I've posted on this before, but I wanted to capture it now. Useful for doing big searches against an Active Directory (default restriction on search results returned is 200). Using Net::LDAP.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;use Net::LDAP;&lt;br /&gt;use Net::LDAP::Entry;&lt;br /&gt;use Net::LDAP::Control::Paged;&lt;br /&gt;use Net::LDAP::Constant qw( LDAP_CONTROL_PAGED );&lt;br /&gt;&lt;br /&gt;my $adHost = "detroit.domain.com"&lt;br /&gt;my $adUsr = "cn=ldapadmin,cn=users,dc=company,dc=domain,dc=com";&lt;br /&gt;my $adPass = "1234xyz";&lt;br /&gt;&lt;br /&gt;my $base = "cn=users,dc=company,dc=domain,dc=com";&lt;br /&gt;my $query = "(mail=*)";&lt;br /&gt;my @attrs = qw(cn displayname mail);&lt;br /&gt;&lt;br /&gt;my $ldap = Net::LDAP-&gt;new($adHost) or die $!;&lt;br /&gt;my $mesg = $ldap-&gt;bind($adUsr, password =&gt;$adPass);&lt;br /&gt;&lt;br /&gt;my $page = Net::LDAP::Control::Paged-&gt;new( size =&gt; 1000 ) or die $!;&lt;br /&gt; &lt;br /&gt;my @args = ( base =&gt; $base,&lt;br /&gt;             scope =&gt; 'sub',&lt;br /&gt;             filter =&gt; $query,&lt;br /&gt;             attrs =&gt; \@attrs,&lt;br /&gt;             control =&gt; [ $page ],&lt;br /&gt;           );&lt;br /&gt;   &lt;br /&gt;my $cookie;&lt;br /&gt; &lt;br /&gt;while (1) {&lt;br /&gt; &lt;br /&gt;     $mesg = $ldap-&gt;search ( @args ) or die $!;&lt;br /&gt; &lt;br /&gt;     while (my $entry = $mesg-&gt;shift_entry()) {&lt;br /&gt; &lt;br /&gt;         my $entrydn = $entry-&gt;dn();&lt;br /&gt;         my $mail = $entry-&gt;get_value('mail');&lt;br /&gt;         my $displayname = $entry-&gt;get_value('displayname');&lt;br /&gt;         my $cn = $entry-&gt;get_value('cn');&lt;br /&gt;&lt;br /&gt;         print "\"$displayname\",\"$mail\"\n";&lt;br /&gt;&lt;br /&gt;     } # while&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt; my ($resp) = $mesg-&gt;control(LDAP_CONTROL_PAGED) or last;&lt;br /&gt; $cookie = $resp-&gt;cookie or last;&lt;br /&gt; $page-&gt;cookie($cookie);&lt;br /&gt;  &lt;br /&gt;} # while (1)&lt;br /&gt; &lt;br /&gt;if ($cookie) {&lt;br /&gt; $page-&gt;cookie($cookie);&lt;br /&gt; $page-&gt;size(0);&lt;br /&gt; $ldap-&gt;search( @args );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;$ldap-&gt;unbind;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-9135971905643585586?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/9135971905643585586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/9135971905643585586'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/03/simple-paged-results-with-netldap.html' title='Simple Paged Results with Net::LDAP'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-4621770286186346682</id><published>2007-03-10T00:45:00.000-05:00</published><updated>2007-04-04T01:48:42.364-04:00</updated><title type='text'>Installing Oracle OIM_OIF 10g R3</title><content type='html'>... otherwise known as Oracle Identity Management 10g, Release 3 (10.1.4.0.1), which is a mouthful, even for an Oracle product.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;em&gt;This article will be updated from time to time as I learn more about how these Oracle products fit together.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Previous versions of 10g Application Server included the Identity Management Infrastructure. With Release 3, it gets split off into it's own distribution on 2 separate CD's.&lt;br /&gt;&lt;br /&gt;There are lots of little improvements that go into the new release, not the least of which is the update to database 10.1.0.5 and Application Server 10.1.2.0.2 that relieves you of the time-consuming task of patching up to these versions.&lt;br /&gt;&lt;br /&gt;Installing is pretty straightforward. If you use CentOS 4 as I do, you'll need to modify the &lt;code&gt;/etc/redhat-release&lt;/code&gt; file by deleting the line referring to CentOS and substituting "Red Hat Enterprise Linux AS release 4" so that the installer will not abort because your system isn't certified.&lt;br /&gt;&lt;br /&gt;Assuming my install will be called "infra1", this is how I would lay out the filesystem:&lt;br /&gt;&lt;br /&gt;Oracle Base /u01/app/orainfra&lt;br /&gt;Oracle Inventory /u01/app/orainfra/oraInventory&lt;br /&gt;Oracle Home /u01/app/orainfra/product/10.1.4&lt;br /&gt;Database files /u02/oradata/infra1&lt;br /&gt;&lt;br /&gt;(the db instance was named "infra1", which is also the SID)&lt;br /&gt;&lt;br /&gt;Make sure to have root privileges on the server. There are a couple of scripts that need to be run as root during the install.&lt;br /&gt;&lt;br /&gt;There may be kernel parameter changes that need to be done. These can be done dynamically using the &lt;code&gt;sysctl&lt;/code&gt; utility, without rebooting the system. The &lt;a href=""&gt;Quick Install Guide&lt;/a&gt; has  a nice section on how to do this under &lt;a href="http://download-east.oracle.com/docs/cd/B28196_01/install.1014/b28194/reqs.htm#CDEGCEEG"&gt;"Kernel Parameter Settings for OracleAS Metadata Repository"&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks to the Energy Policy Act of 2005, every system on the planet needs to be patched to account for DST coming early this year, March 11 to be exact.&lt;br /&gt;&lt;br /&gt;Oracle is no exception, and even though it was only release a little while ago, Identity Manager R3 also requires patching.&lt;br /&gt;&lt;br /&gt;There are two basic patches that are needed, both only available to customers with support contracts, via &lt;a href="http://metalink.oracle.com"&gt;MetaLink&lt;/a&gt;:&lt;ul&gt;&lt;br /&gt;&lt;li&gt;5865568, updates the Oracle JVM used by the App Server with the new timezone data.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;5632264, replaces the old timezone data for the database and database clients.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Ah, let the games begin!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-4621770286186346682?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4621770286186346682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/4621770286186346682'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/03/installing-oracle-oimoif-10g-r3.html' title='Installing Oracle OIM_OIF 10g R3'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-510397914769784035</id><published>2007-02-11T09:50:00.000-05:00</published><updated>2007-02-11T11:58:47.306-05:00</updated><title type='text'>Using round robin DNS to load balance LDAP</title><content type='html'>This is so simple in BIND 9, it's scary. Don't let anyone tell you it can't/shouldn't be done. Remmember, if LDAP is unavailable because the host your apps are hardcoded to point at is down -- it's your rear end.&lt;br /&gt;&lt;br /&gt;Here's how I do it (at home, I have NO control over DNS at work -- their loss).&lt;br /&gt;&lt;br /&gt;Add an additional interface on each LDAP box to dedicate to the round robin process. If you've got your LDAP server tied down to a single interface, add this new interface to the mix (or open LDAP up to listen on all interfaces -- the default for Sun and Red Hat Directory Server).&lt;br /&gt;&lt;br /&gt;Now add a new A record in your forward zone file for each of these two new interfaces, giving them the same host name. On my home network it looks something like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;ldap A 192.168.2.101&lt;/code&gt;&lt;br /&gt;&lt;code&gt;ldap A 192.168.2.102&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Finally, update the serial number on your forward zone file and reload the config. For Red Hat/CentOS/Fedora you can do a&lt;br /&gt;&lt;br /&gt;&lt;code&gt;/sbin/service named reload&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;That's all there is to it. The default behavior with BIND 9 will be to give a different address as the first in the list returned each time. As a result you'll see:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[root @bigserver ~] nslookup ldap&lt;/code&gt;&lt;br /&gt;Server:         192.168.0.112&lt;br /&gt;Address:        192.168.0.112#53&lt;br /&gt;&lt;br /&gt;Name:   ldap.mydomain.com&lt;br /&gt;Address: 192.168.0.101&lt;br /&gt;Name:   ldap.mydomain.com&lt;br /&gt;Address: 192.168.0.102&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;the first time and&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[root @bigserver ~] nslookup ldap&lt;/code&gt;&lt;br /&gt;Server:         192.168.0.112&lt;br /&gt;Address:        192.168.0.112#53&lt;br /&gt;&lt;br /&gt;Name:   ldap.mydomain.com&lt;br /&gt;Address: 192.168.0.102&lt;br /&gt;Name:   ldap.mydomain.com&lt;br /&gt;Address: 192.168.0.101&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;on the second try. Your client will use the first address provided each time.&lt;br /&gt;&lt;br /&gt;Now you have no excuse.&lt;br /&gt;&lt;br /&gt;That is all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-510397914769784035?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/510397914769784035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/510397914769784035'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/02/using-round-robin-dns-to-load-balance.html' title='Using round robin DNS to load balance LDAP'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-6297333456809471415</id><published>2007-02-07T10:15:00.000-05:00</published><updated>2007-03-15T01:30:03.150-04:00</updated><title type='text'>Installing Fedora Directory eldapo's way</title><content type='html'>A colleague (the infamous &lt;a href="http://garyutz.com/"&gt;Gary Utz&lt;/a&gt;, "Worlds Greatest SysAdmin") has been asked to install Fedora Directory on a Red Hat Enterprise 3 VMWare guest, and needs some guidance on how to approach it. Since he's been my lifeline in more tight spots than I can remmember, there wasn't any question that I would help.&lt;br&gt;&lt;br /&gt;So here, for both him and my vast Internet audience (both of you), is my own take on how to install Fedora Directory on Red Hat Enterprise Linux.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note to The Experienced&lt;/strong&gt;&lt;br /&gt;First, if you happen to be an experienced Netscape/Sun Directory admin, keep in mind that the Red Hat team has been through 4 minor version updates since the purchase of Netscape Directory 6. There &lt;strong&gt;are&lt;/strong&gt; differences in the Red Hat product that you should keep an eye out for.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;System Minimums&lt;/strong&gt;&lt;br /&gt;Minimum system requirements to install and run Fedora Directory are simple. First, although you can try to compile from source for other platforms, at the moment binary packages are only available in rpm format for &lt;a href="http://www.redhat.com"&gt;Red Hat Enterprise&lt;/a&gt; and &lt;a href="http://fedora.redhat.com"&gt;Fedora Linux&lt;/a&gt;. As a RHEL clone, &lt;a href="http://www.centos.org"&gt;CentOS&lt;/a&gt; works fine too and is highly recommended at least for test environments (it's what I use in my home lab). You'll need at least 1 Gb RAM and 1.5 Gb swap. CPU should be above 1 GHz. Dual core, or dual CPUs, are better than single core. Like all LDAP servers, FDS is a cycle hog. The software itself needs about 300 Mb of space when it first installs, last time I checked, but I'd give it at least 1 Gb because once you start running you're going to need it for the database files.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Get the Software&lt;/strong&gt;&lt;br /&gt;To begin, you need to download the appropriate rpm from &lt;a href="http://directory.fedora.redhat.com/wiki/Download"&gt;Fedora Directory Project Download&lt;/a&gt;. The latest as of this writing is v1.0.4, and is available for every Red Hat platform starting with Fedora Core 2/RHEL 3 and up to Fedora Core 6. Starting with Fedora Core 4 there is also a version for x86_64. For Red Hat Enterprise 3, you need to use the Fedora Core 2/RHEL 3 version, for Red Hat Enterprise 4 the Fedora 3/RHEL4 version and so on.&lt;br&gt;&lt;br /&gt;These rpms all install to /opt. Sorry, but that's how it is. The next version (1.0.5?) may change that to an install into the base filesystem in accordance with the latest "Filesystem Hierarchy Standard" specification. For more, see the the notes on &lt;a href="http://directory.fedora.redhat.com/wiki/FHS_Packaging"&gt;FHS Packaging&lt;/a&gt;. For now, DO NOT try to change this by recompiling with the srpm. It won't work. Believe me, I've tried.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Installing the RPM&lt;/strong&gt;&lt;br /&gt;Before installing the rpm, you'll need to check on a couple of major system dependencies and install the required software, these are:&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Red Hat's version of the Apache web server (use Red Hat's rpm for &lt;code&gt;httpd-server&lt;/code&gt;).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Sun's Java 1.4 or above (I use Sun's J2SE SDK 1.5 rpm for this, off &lt;a href="http://java.sun.com"&gt;java.sun.com&lt;/a&gt;, which installs to /usr/java/jdk1.5.0_x). You can use the alternatives system for configuring Java (see &lt;a href="http://www.lembobrothers.com/~philip/articles/fc008.html"&gt;my article&lt;/a&gt; on how to do this).&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Installing the rpm is as easy as doing a&lt;br&gt;&lt;br /&gt;&lt;code&gt;rpm -Uvh fedora-ds-1.0.4-1.RHEL3.i386.opt.rpm&lt;/code&gt;&lt;br&gt;&lt;br /&gt;to install the latest version for Red Hat 3, for example.&lt;br&gt;&lt;br /&gt;This will put the setup binaries and utilities under /opt/fedora-ds.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Gather Further Requirements&lt;/strong&gt;&lt;br /&gt;Next, you need to go over to /opt/fedora-ds and execute the &lt;code&gt;idsktune&lt;/code&gt; utility as root in order to determine what needs to be done in preparation for setup.&lt;br&gt;&lt;br /&gt;Pay close attention to what it reports. I would recommend executing like this, &lt;code&gt;idsktune &gt;idsktune.log&lt;/code&gt; so that you can scroll through the output in a text editor.&lt;br&gt;&lt;br /&gt;Take care of the package dependancies first. Most should be easily cured with up2date (or if you're blessed with installing on &lt;a href="http://www.centos.org"&gt;CentOS&lt;/a&gt; or &lt;a href="http://fedora.redhat.com"&gt;Fedora Core&lt;/a&gt;, yum).&lt;br&gt;&lt;br /&gt;In addition to some additional software, you will probably also need to make some kernel configuration changes.&lt;br&gt;&lt;br /&gt;Everything I'm about to say on that, and more, is contained in an article on &lt;a href="http://directory.fedora.redhat.com/wiki/Performance_Tuning"&gt;Peformance Tuning&lt;/a&gt; up on the &lt;a hred="http://directory.fedora.redhat.com/wiki"&gt;Fedora Directory Wiki&lt;/a&gt;, which I consider essential reading.&lt;br&gt;&lt;br /&gt;At a miniumum you're going to want/need to:&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Increase the number of local ports available with&lt;br&gt;&lt;br /&gt;&lt;code&gt;echo "ipv4.ip_local_port_range = 1024 65000" &gt;&gt; /etc/sysctl.conf&lt;/code&gt;&lt;br&gt;&lt;br /&gt;and running &lt;code&gt;/sbin/sysctl -p&lt;/code&gt; to effect the change.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Make the following changes to the number of available files and file descriptors available:&lt;br&gt;&lt;br /&gt;&lt;code&gt;echo "fs.file-max = 64000" &gt;&gt; /etc/sysctl.conf&lt;/code&gt;&lt;br&gt;&lt;br /&gt;&lt;code&gt;echo "* soft nofile 8192" &gt;&gt; /etc/security/limits.conf&lt;/code&gt;&lt;br&gt;&lt;br /&gt;&lt;code&gt;echo "* hard nofile 8192" &gt;&gt; /etc/security/limits.conf&lt;/code&gt;&lt;br&gt;&lt;br /&gt;Effect these changes by a &lt;code&gt;sysctl -p&lt;/code&gt; and a &lt;code&gt;ulimit -n 8192&lt;/code&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Running Setup&lt;/strong&gt;&lt;br /&gt;Do this with a &lt;code&gt;/opt/fedora-ds/setup/setup&lt;/code&gt; as root.&lt;br&gt;&lt;br /&gt;Before getting into the details of how to respond to the prompts, here are some quick design pointers that may be of some help in getting the overall picture:&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Red Hat Directory, like it's predecessors from Netscape and Sun, consists of two parts, an Administration Server and at least one Directory Server. The Administration Server provides access to the Directory environment via the Directory Console, a gui managment utility that connect over http on a custom port. It stores its configuration in the first Directory installed. Red Hat has modified the code so that the Admin Server now uses the system httpd binary and system Java.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I used to set up the initial Directory instance on a non-standard port and make it the configuration directory for that machine. This allowed me to start, stop, delete and create additional user and application directory instances using the gui console, which can be a real time saver for a neophyte. In the interests of simplicity I now put the initial instance on port 389 and let it serve double-duty as my primary user directory.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;For clarity I also used a function-based directory instance naming scheme, "slapd-[hostname]-admin" for the Administration Server directory and "slapd-[hostname]-user", for first Master user directory if these are separate. This is alot more descriptive than the "slapd-[hostname]1", the default. Where there's only one directory instance on the box (which is how I usually set things up nowadays), I just leave off the "-admin" or "-user" qualifier.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Apart from the above, the defaults presented by the installer are actually pretty reasonable.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step-by-Step&lt;/strong&gt;&lt;br /&gt;The Fedora Directory installer is still (thank God) curses based. That means you don't need to fire up X to use it, and the install proceeds pretty briskly along without the usual hesitation (and smearing) that those of us who have to install the latest Sun and Oracle directories have to deal with (there is actually a way to do both of the latter from the command line, but the interfaces are ... clumsy).&lt;br&gt;&lt;br /&gt;The Red Hat &lt;a href="http://www.redhat.com/docs/manuals/dir-server/install/7.1/"&gt;Installation Guide&lt;/a&gt; is still a pretty good reference for this part of the job. As I said above, I used to set up separate administration and user directories on each server, to provide greater flexibility in managing the directory environment with the GUI Directory Console. Two important drawbacks to this approach were that it required the Console user have an account on the administration directory or use Directory Mananger, and, that it forces you to use a separate Console session for each directory server (since every directory server has it's own unique admin server). In my old age I now prefer a really simple, single, directory environment.&lt;ol&gt;&lt;br /&gt;&lt;li&gt;The installer will begin by asking you to accept the license. Answer yes.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Select "install mode" 2 - Typical.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Accept the hostname presented, unless none is found -- in which case quick enter something in /etc/hosts and use that (the directory constantly checks for the host name where it lives).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Server user and group to use. I usually accept "nobody".&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Accept the defaults for Directory Manager dn, enter a password. Do the same for the Administration Server admin.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Set the directory suffix, this should be the Internet domain name for your host, unless you want it to be something different. I usually accept the default (which is the domain name split up like "dc=blogger,dc=com").&lt;/li&gt;&lt;br /&gt;&lt;li&gt;When asked about the configuration directory, use the default -- you want a new one on this machine (unless your enterprise architecture calls for a central config directory -- not a good idea in my opinion, but to each his own).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Port numbers. For the first directory (which will be your main directory for both config and users, if you follow my practice), use standard LDAP port 389. For the Admin Server, again pick something high that won't interfere with other stuff. I like something in the 3000's (usually port 3389).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;For the user directory location, I always choose the default -- a new one on this machine.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Administration domain: default (usually the domain of the machine you're installing to, unless you've got an extensive and complicated architecture calling for multiple admin domains -- God help you).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;At some point you'll get through all of this and setup will finally start the directory and admin servers.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To set up additional directories the best procedure is to fire up the gui Directory Console in an X session, &lt;code&gt;/opt/fedora-ds/startconsole&lt;/code&gt; and connect to the Admin Server using it's unique URL (e.g. http://hostname.domain.com:port), which should have been echoed to the screen when the Admin Server first came up.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;For good documentation on how to actually create and manage additional directories, look at the Red Hat &lt;a href="http://www.redhat.com/docs/manuals/dir-server/ag/7.1/adminTOC.html"&gt;Administrator's Guide&lt;/a&gt; and the extensive &lt;a href="http://directory.fedora.redhat.com/wiki/Documentation"&gt;How-Tos&lt;/a&gt; on the Directory Project site.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Don't forget to create and install an init script to automatically start your environment. A sample is &lt;a href="http://lembobrothers.com/~philip/articles/fds002.html"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;So there you go. That's all there is to it!&lt;br&gt;&lt;br /&gt;Stay tuned for my next post, where I'll cover the dirty business of creating a new user directory from scratch from existing data, including tweaking some important performance settings and pre-loading indexing and access control instructions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-6297333456809471415?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6297333456809471415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/6297333456809471415'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2007/02/installing-fedora-directory-eldapo-way.html' title='Installing Fedora Directory eldapo&apos;s way'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-2782588161861726335</id><published>2006-12-16T10:21:00.000-05:00</published><updated>2006-12-16T10:54:47.325-05:00</updated><title type='text'>Fedora Directory Revisited</title><content type='html'>I've spent the last few months immersed in Oracle's identity management products as part of my preparation for working on a team bringing Oracle ERP to my company. These products are surprisingly good, particularly the core Oracle Internet Directory (OID). OID is basically an LDAP listener for an Oracle database. I've been quite impressed with it's performance and features (for example it supports &lt;em&gt;both&lt;/em&gt; Simple Paged Results Control and Server Side Sort). Of course, like all directories except those from the Netscape lineage (Sun and Red Hat's in the current market), it failed my super-secret stress test -- predictably crashing when I did a ridiculously large bulk load imto it. That's not Oracle's fault, it's just a consequence of inefficiencies in the LDAP protocol.&lt;br /&gt;&lt;br /&gt;In the little spare time I've had during the last week I was able to install and begin working with the latest release of Fedora Directory Server. I've been considering moving my home environments over to FDS for some time now. While reluctant to give up the simplicity and rock-solid stability (well, most of the time) of OpenLDAP, going to full immersion mode with FDS has been a long time coming. One of the differences between this conversion and the brief forays of the past is that I'm pairing it with a working deployment of JBoss.&lt;br /&gt;&lt;br /&gt;While I try to keep an open mind about the appropriate uses of closed source software, I continue to believe that open source development provides better, albeit sometimes imperfectly executed, results. The open-sourcing of the former Netscape Directory codebase was a major, revolutionary, step for the identity management business. Warts and all, that codebase has consistently delivered superior results during it's lifetime. The Fedora team has made some significant improvements. One of my favorites was replacing the old Netscape web server code for the Administration server with Apache.&lt;br /&gt;&lt;br /&gt;Because of this continuing effort to improve the codebase I am much more comfortable with plans by the developers to more tightly integrate FDS with Fedora Core, and presumably, Red Hat Enterprise Linux. While the OpenLDAP SDK and tools have served the community well, there's no reason FDS can't be positioned to provide a high quality alternative. From a system administrator's perspective, OpenLDAP's ubiquitous libraries and tools have provided a kind of standard that should not be taken for granted.  As we've seen with other open source projects, the ultimate solution might be a convergence of the code where OpenLDAP and FDS adopt the best features from each others source.&lt;br /&gt;&lt;br /&gt;Perhaps the greatest contribution by the FDS developers so far has been the additional documentation they've published. The &lt;a href="http://directory.fedora.redhat.com/wiki/Documentation"&gt;Documentation Wiki&lt;/a&gt; provides information and techniques  that I've found helpful even in my company's Sun Directory environment. I'm looking forward to using it to build my own reference environment in the home lab.&lt;br /&gt;&lt;br /&gt;Look for this blog to me a little more active from this point forward, as I explore FDS in more depth and note my progress here. Hopefully&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-2782588161861726335?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/2782588161861726335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/2782588161861726335'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2006/12/fedora-directory-revisited.html' title='Fedora Directory Revisited'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-114824355935968832</id><published>2006-05-21T15:48:00.000-04:00</published><updated>2007-03-10T01:29:26.967-05:00</updated><title type='text'>New LDAP Stuff and Musings on System Integration</title><content type='html'>I've got some new articles posted over on &lt;a href="http://lembobrothers.com"&gt;lembobrothers.com&lt;/a&gt; under my &lt;a href="http://lembobrothers.com/~philip"&gt;personal home page&lt;/a&gt;. Two of them deal with using the Net::LDAP perl module to connect to LDAP directories over &lt;a href="http://lembobrothers.com/~philip/articles/perl012.html"&gt;TLS&lt;/a&gt; or &lt;a href="http://lembobrothers.com/~philip/perl013.html"&gt;SSL&lt;/a&gt;. The latter includes a script I wrote to connect to an SSL enabled Active Directory. Speaking of Active Directory, I've also got a short piece on &lt;a href="http://lembobrothers.com/~philip/articles/cp009.html"&gt;SSL Enabling Active Directory&lt;/a&gt; and another on &lt;a href="http://lembobrothers.com/~philip/articles/cp010.html"&gt;forcing AD passwords&lt;/a&gt; using Net::LDAP from a Unix box.&lt;br /&gt;&lt;br /&gt;My work in directory services continues to be more and more concentrated on integration with other systems, particularly COTS (Commercial Off-The-Shelf) software. Contrary to what most CIO's seem to believe, dropping COTS (also called "packaged software") into an environment can cost as much in integration expense as writing something in house from the ground up, A big difference between the two approaches is that closed-source COTS software can continue to generate unanticipated expense when patches or upgrades "break" existing integration solutions. Fear of these kinds of hard costs will often lead internal project teams to shy away from promising any level of integration at all, resulting in a net loss of functionality for users. To be honest, I don't blame internal IT. The fact is that many -- no, most -- integration solutions from commercial vendors are "Rube Goldberg" affairs whose fragility make it a sure bet that eventually there will be a "crash and burn".&lt;br /&gt;&lt;br /&gt;That's too bad. Open source software and community support tools like wikis, forums and plain old cvs could revolutionize how IT gets the job done, and lead to huge improvements in both the quantity and quality of what the end user receives.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-114824355935968832?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/114824355935968832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/114824355935968832'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2006/05/new-ldap-stuff-and-musings-on-system.html' title='New LDAP Stuff and Musings on System Integration'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-114411456356447530</id><published>2006-04-03T21:03:00.000-04:00</published><updated>2006-04-03T21:36:03.640-04:00</updated><title type='text'>An Admin's Life</title><content type='html'>As I write this one of my colleagues is still at work, waiting for a very important group of MS Exchange accounts in a particular Active Directory container to get rebuilt. The problem started earlier today when I did a quick mod to a production script that we thought would clean up some cruft in that container. Instead it (quite predictably, in hindsight) whacked all the user accounts in the container, about 100 in all. After a couple of hours a strategy was agreed upon to repair the damage, and the process begun. So here we sit and wait. My friend, who is the lead Exchange admin, in front of a console at work and me, here in my basement waiting for the phone to ring.&lt;br /&gt;&lt;br /&gt;Everyone who's ever worked as a sysadmin knows these kinds of humbling moments. The good part is that you tend to find out who your friends really are. While it doesn't quite erase the sense of defeat and hopelessness that surround such situations, it is nice to see the team at work together on a problem. On that note I count myself privileged to be part of this team. Although alot has changed over the last 8 years, the one thing that hasn't is the sometimes overwhelming generosity and kindness that sets my co-workers here apart from those in other places I've worked.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-114411456356447530?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/114411456356447530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/114411456356447530'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2006/04/admins-life.html' title='An Admin&apos;s Life'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-114329653785665556</id><published>2006-03-25T08:46:00.000-05:00</published><updated>2006-05-21T16:35:53.866-04:00</updated><title type='text'>Where OpenLDAP Fits</title><content type='html'>With all the buzz about Sun and Red Hat's latest offerings, &lt;a href="http://www.openldap.org"&gt;OpenLDAP&lt;/a&gt; has not received much attention lately. There has in fact been a steady improvement in the product, and it's had significant penetration into the enterprise over the last two years. The most significant commercial deployment has been at &lt;a href="http://www.hp.com"&gt;HP&lt;/a&gt;, where Katik Subbrao &amp; Co. have made &lt;a href="http://www.symas.com"&gt;Symas's&lt;/a&gt; Connexitor Directory the core of their company's Identity Management infrastructure. The nice thing for the OpenLDAP community is that all of the new functionality built into Connexitor for HP can eventually wind up as part of OpenLDAP, as Symas is a major contributor to the project.&lt;br /&gt;&lt;br /&gt;Although its nice to see OpenLDAP getting such a big boost over at a big company like HP, I see it being a strong contender in small to medium sized environments. As shipped with &lt;a href="http://www.redhat.com"&gt;Red Hat&lt;/a&gt; Enterprise Linux 4, OpenLDAP is a reliable, seamlessly integrated and well-documented operating system service that can serve as the basis for a no frills authentication and white pages directory solution. When combined with Kerberos, it can provide a secure, standards-based identity management infrastructure. In an alternate universe where vendor and consultancy hype (as well as the corporate IT penchant for consuming licenses as easily as my co-workers do pretzels) I could easily see an enterprise the size of my own company (approximately 10,000 users) easily satisfying its identity management requirements with this software stack.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.linuxjournal.com"&gt;Linux Journal&lt;/a&gt; only recently completed yet another series focused on deploying OpenLDAP and Kerberos as an Identity Management solution. These articles got me thinking again about all the opportunities this software provides. One of my personal projects for the balance of this year will involve exploring how the latest syncrepl "pull" based replication can provide the basis for a highly available service infrastructure.&lt;br /&gt;&lt;br /&gt;OpenLDAP is such a good fit in so many situations that I hope Red Hat will continue to ship it as an integrated part of their OS, and not deprecate it in favor of their more complex Fedora/Red Hat/Netcape Directory product. If it were any other software vendor, I'd say the odds would be against it -- but we're talking about Red Hat here, the company that bowed to pressure from its customers to &lt;em&gt;finally&lt;/em&gt; start shipping more current MySQL packages (previously Red Hat had only shipped packages based on a legacy version), and so I'm pretty sure that OpenLDAP will continue to be an optional part of their shipping product.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-114329653785665556?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/114329653785665556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/114329653785665556'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2006/03/where-openldap-fits.html' title='Where OpenLDAP Fits'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-114329399971661131</id><published>2006-03-25T07:46:00.000-05:00</published><updated>2006-04-19T23:55:48.463-04:00</updated><title type='text'>Forking with Sun - Almost</title><content type='html'>With their latest version releases, the Netscape family directory products of Sun and Red Hat have finally forked significantly enough to make seamless interoperability a thing of the past. The different algorithms used for replication now make it impossible for these latest directories to replicate with each other. This was to be expected. Intellectual property law concerns really demanded it, especially if Sun's version was to remain a proprietary product.&lt;br /&gt;&lt;br /&gt;At my company we have opted to remain with Sun, primarily because by doing so we can avoid the steep initial cost of purchasing Red Hat's commercially supported product (I opted not to push for implementation of the free Fedora Directory product sans support, which would have been too radical a step for them). I've already deployed the latest release of Sun Java Systems Directory (v5.2) in development, and hope to move quality and production over to it in good order. The demand for high availability has finally forced us to adopt a multi-master model, which is not supported by OpenLDAP, and the need to simplify sign-on has led us to begin testing Sun's Identity Synchronization for Windows, for which their directory product (among other things) is a dependancy. Red Hat/Fedora could have satisfied both these requirements with their slightly different solutions, but unfortunately the startup cost of licensing the necessary instances was prohibitive. As a long-time Sun customer our cost to implement Sun's solution was ... $0.&lt;br /&gt;&lt;br /&gt;I don't see this as necessarily a loss for Red Hat. It may very well be that Red Hat does not have the resources to do this yet, or that they aren't yet convinced that directory services should be part of their core business. There's nothing wrong with that. Deployment of directory services has become just one step in building an Identity Managemnt infratructure, and Red Hat does not really have its own IM offering. The big players in that space are CA (with the former Netegrity SiteMinder product), Sun (with its Java Systems Identity Management Suite), Oracle and Microsoft. Of these, only CA and Sun's offerings are real end-to-end solutions, and I would argue that Sun is the more complete of these two.&lt;br /&gt;&lt;br /&gt;Of course we run the CA solution in my work environment -- which at the time seemed to be the way to go (Sun's entire product line was in serious flux at the time). Time will tell whether any other vendor will be able to make a dent in this market. I doubt that Red Hat will try. Their best strategy is to continue concentrating on their core compentency in providing the best server OS platform available (not that I don't expect some movement toward a compelling desktop product soon -- more on that in my other blog).&lt;br /&gt;&lt;br /&gt;The upshot of all of this is that now that we've forked with the Sun product, there's really no easy was to turn back. For all intents and purposes my company won't be exploring deployment of Red Hat Directory going forward. Barring the collapse of Sun, or its abandonment of its own directory, we're now stuck with them. There is the possibility that Sun will participate in the Fedora Directory project and contribute their own changes to it. I don't see that happening in the near term, although I think it would be a huge benefit to the entire OSS community.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-114329399971661131?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/114329399971661131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/114329399971661131'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2006/03/forking-with-sun-almost.html' title='Forking with Sun - Almost'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-111786244303783287</id><published>2005-06-04T00:57:00.000-04:00</published><updated>2005-06-04T01:23:29.943-04:00</updated><title type='text'>Fedora Directory Replica of Sun Directory Master</title><content type='html'>I've already posted this to the Fedora Directory User List. After downloading the Fedora Directory rpms to a Red Hat Enterprise 3 on HP Vectra desktop yesterday, I did a quick install of the server as a consumer directory. I then went up to my company development LDAP master, which runs Sun One Directory 5.1 SP2 on Solaris/Sparc (an E220, I think), and set up a replication agreement to push the directory out to the new Fedora consumer. That was it. Within 25 minutes of running &lt;code&gt;rpm -ivh *RHEL4*.rpm&lt;/code&gt;, I was able to make queries against the consumer and to verify that changes on the master were flowing out to it. Not bad.&lt;br /&gt;&lt;br /&gt;Today I had a chance to play with this setup some more, and deploy the Fedora DS to a couple of Fedora Core 3 machines. All had already been preinstalled by me with Sun's Java SDK 1.4.2, configured through the alternatives system, and had their own little java.sh script in /etc/profiles.d to make the Java environment universal. About the only problem I've had is an inability to launch the Directory Console in a remote X session. While other Java apps run fine remotely, the DS Console is stubbornly refusing the play ball. I had similar problems with the Sun One 5.x Console though (don't remmember it with the 4.x one), so I'm not letting it get me down. At home I've configured my two test LDAP servers to use multi-master replication, and hope to be able to experiment some with the DSML Gateway and try my hand at some ad hoc Samba integration. At work the bosses are asking about the included Windows Password Sync, but I'm going to try to hold them up for a firm commitment on some new x86 hardware to migrate the present environment to Red Hat.&lt;br /&gt;&lt;br /&gt;In the meantime, I've begun planning my "sabbatical", 8 weeks of paid leave that employees at my company get after 7 years of service. Our current plans will take us down to the North Carolina shore for a week, up inland and then back North through Virginia and Maryland before returning to Long Island. I've already told my bosses that I'm going to be leaving not only my pager  behind (a sacred tradition for those on sabbatical), but also my company laptop. The kids were happy to hear that, that laptop is too often a rival for my attention. Over a decade ago I bailed out of the legal profession in part to be able to spend more time with my family. Although IT has been very good to us, sometimes it can be as jealous a mistress as the law ever was. Keeping the job in its proper place is one of those constant battles, like mosquito control, you just have to keep plugging away at.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-111786244303783287?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/111786244303783287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/111786244303783287'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2005/06/fedora-directory-replica-of-sun.html' title='Fedora Directory Replica of Sun Directory Master'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-111769360062097903</id><published>2005-06-02T02:08:00.000-04:00</published><updated>2005-06-02T02:32:41.640-04:00</updated><title type='text'>Red Hat Directory Server Announced</title><content type='html'>Not really news at this point, but today Red Hat announced the open sourcing of the former Netscape Directory Server as the "Red Hat Directory Server". Like it's Enterprise Linux product, the directory would be available on a subscription basis. Further development will be conducted within a new &lt;a href="http://directory.fedora.redhat.com"&gt;Directory Project&lt;/a&gt; within the &lt;a href="http://fedora.redhat.com"&gt;Fedora Project&lt;/a&gt;. I knew something was up when I stumbled across the newly rebranded Red Hat product documentation on their site last week. How big a deal is this? Well, last I checked (about 1 minute ago) the new Fedora Directory site is not responding, obviously as the result of being hammered by a multitude of engineers like myself who are looking the long-awaited source code for this directory product. Will this sideline &lt;a href="http://www.openldap.org"&gt;OpenLDAP&lt;/a&gt;? I certainly hope not. That open source rival has improved so much in performance and reliability over the last 2 years that I and many others think it's more than ready for the enterprise. &lt;a href="http://www.symas.com/10k-cdsvnds.shtml"&gt;Benchmarks&lt;/a&gt; released by &lt;a href="http://www.symas.com"&gt;Symas Corporation&lt;/a&gt;, show the overall performance of their commercial OpenLDAP based directory matching that of the Netscape product that Red Hat purchased. I intend to continue developing solutions with OpenLDAP, while at the same time taking the plunge into the new Fedora Directory as soon as I can get the code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-111769360062097903?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/111769360062097903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/111769360062097903'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2005/06/red-hat-directory-server-announced.html' title='Red Hat Directory Server Announced'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-111256743623657876</id><published>2005-04-03T14:12:00.000-04:00</published><updated>2005-04-03T18:33:58.940-04:00</updated><title type='text'>Red Hat Directory Coming Soon</title><content type='html'>The &lt;a href="http://http://www.redhat.com/about/presscenter/2004/press_neighbor.html"&gt;press release&lt;/a&gt; in which Red Hat announced it's purchase of the Netscape Security Solutions products, including Directory Server, stated in part that:&lt;br /&gt;&lt;br /&gt;"Red Hat plans to start marketing these products as part of its Open Source Architecture over the next 6 to 12 months."&lt;br /&gt;&lt;br /&gt;Then in January &lt;a href="http://www.internetnews.com"&gt;InternetNews&lt;/a&gt; had an &lt;a href="http://www.internetnews.com/dev-news/article.php/3456361"&gt;article&lt;/a&gt; quoting a Red Hat spokesperson that the company would by releasing the Directory source under the GPL in the next 12 months.&lt;br /&gt;&lt;br /&gt;Chris Blizzard of Red Hat wrote about the subject in a &lt;a href="http://www.0xdeadbeef.com/html/2005/01/"&gt;January blog entry&lt;/a&gt;. After making reaffirming his employer's commitment to open source and to taking this particular code into the community, he went on to say:&lt;br /&gt;&lt;br /&gt;"We'll be open sourcing components as we can. We've still got to talk to our customers and figure out what they would like to see. We need to try to talk to the larger community and try to come up with a structure that works to build a large, outward-facing and successful project. And we need to get the source code ready. None of these tasks are small. But we're working on them. Stay tuned."&lt;br /&gt;&lt;br /&gt;Later, in a &lt;a href="http://www.0xdeadbeef.com/html/2005/02/"&gt;February entry&lt;/a&gt;, he expanded further on what was going on behind the scenes:&lt;br /&gt;&lt;br /&gt;"For the Directory Server we've selected a license for the project and have started working on getting the source together for a release... From the strictly technical standpoint, we've got some large hurdles... The build system that it uses right now is pretty far from autoconf... the locations for a lot of the libraries that the Directory Server expects to build against are hard wired into the build system... I'm not sure if we'll be in a buildable state at the time the source is released, but I'm hoping that we can get there. It's just a long road."&lt;br /&gt;&lt;br /&gt;Red Hat now hosts the &lt;a href="http://www.redhat.com/software/rha/netscape/"&gt;documentation&lt;/a&gt; for the acquired Netscape products. In talking about the release of Red Hat Enterprise Linux 4 Server, one of the product team members noted that they were able to successfully install the Directory Server on it (something that can't be said for Sun's latest version of the same product). What this all means is that we'll probably see an early opening up of the source tree for the Directory very soon, with SRPMS and RPMS to follow awhile later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-111256743623657876?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/111256743623657876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/111256743623657876'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2005/04/red-hat-directory-coming-soon.html' title='Red Hat Directory Coming Soon'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-110589046733424918</id><published>2005-01-16T10:43:00.000-05:00</published><updated>2005-01-16T10:47:47.333-05:00</updated><title type='text'>Federated Directories</title><content type='html'>The nice thing about finally getting some help in operating the LDAP environment is that I can restart some long dormant LDAP related research projects, like designing an enterprise configuration that uses OpenLDAP. One idea I have is to try using the meta backend to provide an aggregated view of our Active Directory and regional Notes directories. This would result in a "federated" directory infrastructure that gets administered at the local level. Basically, the meta backend would do all the translation for things like differing attribute names and tree structures so that the actual directory holding the data would not matter to the end user (or consumer application). It's going to take some time to get it right, but from what I've read in the OpenLDAP doc and on the mail lists it should be more than doable. The labor intensive part will be in creating the schema files to support all those different directories, since the native schemae are not in OpenLDAP schema format. The mapping part should not be too difficult, I've already documented most of it though, so its just a matter of making the time to get it done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-110589046733424918?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/110589046733424918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/110589046733424918'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2005/01/federated-directories.html' title='Federated Directories'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-110589017634312063</id><published>2005-01-16T10:41:00.000-05:00</published><updated>2007-02-07T16:01:02.112-05:00</updated><title type='text'>Life Beyond LDAP</title><content type='html'>One big change that's been happening at work is I've finally gotten a designated "apprentice" to train to do my LDAP job when I go on sabbatical this summer (in keeping with the saying "two there are always, a master and his apprentice"). As a practical matter this means I should begin having time to do more non LDAP stuff as summer draws near. One of the areas I'm interested in pursuing is system security, and right now I'm looking around for some security training courses. The Red Hat class, emphasizing as it does hands on configuration, is a good possibility. I've been spending more time with the server consolidation team lately, yapping about our nascent Linux infrastructure, so there is a practical benefit to my employer. Another area I'm going to be spending more time on is source control for our internal admin applications like Perl and shell scripts. The new monitoring guy has put up a cvs tree and we're now getting all the sysadmins in the department to contribute their code, wherever it might happen to be. I'll be configuring a webcvs front end for it soon, to make it easier to browse the code base.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-110589017634312063?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/110589017634312063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/110589017634312063'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2005/01/life-beyond-ldap.html' title='Life Beyond LDAP'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-110588897357426970</id><published>2005-01-16T09:49:00.000-05:00</published><updated>2005-01-16T10:41:40.866-05:00</updated><title type='text'>Forward with Fedora Core</title><content type='html'>Been pretty busy through the New Year. One major change was migrating from FreeBSD to Fedora Core 3 as my home desktop and server O/S. There's just one FreeBSD box left, my 5.2.1 file server, that also does DNS and DHCP for the internal network in the basement downstairs. Now that I've finally got another reasonably big Fedora file server up (80 Gb HDD), I'll be moving the data over from the BSD box and reformatting it for either Fedora or Red Hat Enterprise Server 4 Beta. My guess is that Enterprise 4 will be in release by the time I get around to taking the RHCE again, so I might as well get up to speed on it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-110588897357426970?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/110588897357426970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/110588897357426970'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2005/01/forward-with-fedora-core.html' title='Forward with Fedora Core'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-110370052215934295</id><published>2004-12-22T02:05:00.000-05:00</published><updated>2005-01-16T09:45:44.986-05:00</updated><title type='text'>Back to Red Hat</title><content type='html'>Last week I took the Red Hat Certified Engineer "Crash Course", a five day marathon that resulted in my receiving the lesser Red Hat Certified Technician (RHCT) credential after the hardest test I've ever taken (&lt;em&gt;including&lt;/em&gt; the NY Bar Exam). Given the time and pain invested in both the course and the test, I've decided to go the total immersion route with things Red Hat for awhile. That's already resulted in wiping the disks of my primary desktops at home and work, and installing Fedora Core 3 on them. I've also put up a Red Hat Enterprise Server 3 box at each location for further practice. For now, the main file server at home remains on FreeBSD 5.2.1, but will probably get reinstalled at a Red Hat box as well. My original foray into UNIX systems was on Red Hat Linux 5.1 (Manhatten), and I was a die hard devotee of Red Hat 6.2 (Apollo) long after most of the world moved on to the 2.4 kernel. The last Linux I ran before switching to BSD was Red Hat 7.3 (Valhalla), which would become the basis for Red Hat Enterprise 2.1 Advanced Server (I'm not counting the brief experience I had with the Marist College distribution of Linux for S/390 I installed as a POC for work).&lt;br /&gt;&lt;br /&gt;One thing I learned a few months ago when I started working with Red Hat Enterprise 3 was that in many cases compiling from source yielded better results than using an rpm. This turned out to be especially true for multimedia apps on both Workstation and Fedora Core. Mplayer, an app I've grown fond of because of its uncanny ability to do everything that the Quicktime and Windows Media players can do, is a case in point. Another app I'll probably be building from source is OpenLDAP, since even the latest rpm was compiled in such a way that most of the "good stuff" is not enabled. My instructor for the RHCE class suggested I try building my own rpm for OpenLDAP, something I'm now researching as a way to make possible future maintenance easier.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-110370052215934295?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/110370052215934295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/110370052215934295'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/12/back-to-red-hat.html' title='Back to Red Hat'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-110018618759990088</id><published>2004-11-11T09:46:00.000-05:00</published><updated>2004-11-11T10:16:27.600-05:00</updated><title type='text'>Sun Directory 5.1 SP2 on FreeBSD 5.2.1</title><content type='html'>Well, not quite. I have finally managed to get the Directory Console to install and run, though. This is a good thing on many levels, not the least of which is I finally can run it on a stable platform for day to day management tasks. Sure, it still goes all "smeary" sometimes, but, I've noticed that the GUI actually seems to snap back quicker than on Windows -- much like it does when running it on Solaris/Sparc.&lt;br /&gt;&lt;br /&gt;The big challenge is still to get something working on Red Hat Enterprise 3 (maybe 4, by the time my company takes the plunge). So far I haven't had any luck getting the Sun Admin Server to install cleanly, although ns-slapd does work. Problem there is that directory operations are now so tied up with the GUI that the Admin Server is a must-have. I did get a response to my post on the Sun Developer Forum that led me to a patch, but have not yet had the time to test it.&lt;br /&gt;&lt;br /&gt;My hope is that Red Hat itself gets an open sourced edition of the Netscape Directory server out the door sooner than later. Assuming it passed my internal quality testing, I'd be inclined to recommend that as a solution going forward. Not that I'll abandon experimenting with OpenLDAP, which I continue to believe will be the long term winner so long as they stay on the track they've been on (simple and truly lightweight, rather than complex and bloated).&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-110018618759990088?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/110018618759990088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/110018618759990088'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/11/sun-directory-51-sp2-on-freebsd-521.html' title='Sun Directory 5.1 SP2 on FreeBSD 5.2.1'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109915256069896453</id><published>2004-10-30T11:26:00.000-04:00</published><updated>2004-10-30T14:18:45.550-04:00</updated><title type='text'>LDAP Books</title><content type='html'>Every once and awhile someone asks me to recommend a book or two about LDAP. Fortunately all of these requests so far have been from people looking for a good introduction to the topic, and not for something providing advanced techniques along the lines of &lt;em&gt;Mastering Regular Expressions&lt;/em&gt;(O'Reilly) or the &lt;em&gt;Perl Cookbook&lt;/em&gt;(O'Reilly). Introductory texts on LDAP abound, most follow the pattern of spending their first half explaining the protocol, its accompanying API, and giving a few examples. This is in stark contrast to the LDAP-derived Active Directory, which now can boast several advanced tomes, including my favorites, Robbie Allen's &lt;em&gt;Active Directory Cookbook&lt;/em&gt;(O'Reilly) and his older &lt;em&gt;Managing Enterprise Active Directory Services&lt;/em&gt; (Addison-Wesley).&lt;br /&gt;&lt;br /&gt;About the best introductory book I've found is also one of the more recent, Gerry Carter's &lt;em&gt;LDAP Administration&lt;/em&gt;(O'Reilly), which covers alot of ground for a book that's supposed to focus mostly on OpenLDAP (here's a secret, while OpenLDAP is used as an example LDAP directory through the book, Gerry actually provides a pretty balanced presentation of generic LDAP, including some space on Active Directory). For IT managers, the recently updated &lt;em&gt;Understanding and Deploying LDAP Directory Services&lt;/em&gt; (Addison-Wesley) provides the best resource for architectural issues. Those managing a Sun Directory environment will find the Sun Blueprints series title &lt;em&gt;LDAP in the Solaris Operating Environment&lt;/em&gt; somewhat helpful, although most of the material there appears to be a rehash of the manuals (which are actually pretty good as software manuals go, the &lt;em&gt;Deployment Guide&lt;/em&gt; and &lt;em&gt;Command Reference&lt;/em&gt;, are must-reads).&lt;br /&gt;&lt;br /&gt;For a directory administrator like myself, unfortunately, there is currently no advanced book to help with the practical day to day problems of synchronizing (which is really just a function of "transforming" and then "diffing" entries) directories, writing connectors to non-LDAP systems and best practices for data management. While all the books currently out there provide examples of code using the Netscape SDKs and PerLDAP, these tools are now pretty long in the tooth, and don't have the price/performance punch of the current &lt;a href="http://java.sun.com/products/jndi/tutorial/"&gt;Sun Java/JNDI&lt;/a&gt; and the pure Perl &lt;a href="http://ldap.perl.org"&gt;Net::LDAP&lt;/a&gt; (a/k/a perl-ldap) offerings. To Gerry Carter's credit Net::LDAP gets good coverage in his book (as it does in Robbie Allen's older book, only marketing forces can explain why he went pure VBScript in his newer writings). For OpenLDAP administrators there still is no book with coverage of tuning the Berkeley DB backend, which as I've pointed out elsewhere on this blog is a critical task if that product is to be used in an enterprise environment. What is missing, and sorely needed, is an "LDAP Administrator's Cookbook" and a companion "Advanced LDAP Directory Management" to cover best practices.&lt;br /&gt;&lt;br /&gt;I am, of course, open to any offers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109915256069896453?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109915256069896453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109915256069896453'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/10/ldap-books.html' title='LDAP Books'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109821500638218871</id><published>2004-10-19T16:28:00.000-04:00</published><updated>2004-10-19T15:52:02.223-04:00</updated><title type='text'>Using Spreadsheet::ParseExcel</title><content type='html'>In my own experience as a directory administrator only about 25% of my time is spent managing the servers and software that support the environment. The lion's share of the effort in my job is managing the import and export of data through the directory environment, in most cases working with groups outside the IT department across the globe. Recently we had some weird results when a csv file with employee data from our offices in Brazil was imported into the directory. The short version of the story is that in several attributes (surname, locality, state), some of the characters used didn't quite match up with a known character set. Our assumption is that the data was originally created in Excel and then dumped to CSV format, probably using a localized copy of the program and the Portugese (Brazil) keyboard template. Among other things this got me going in a direction I'd avoided for a long time -- learning how to parse Excel spreadsheets with Perl.&lt;br /&gt;&lt;br /&gt;My problem was that the doc for &lt;a href="http://search.cpan.org/~kwitknr/Spreadsheet-ParseExcel-0.2603/"&gt;Spreadsheet::ParseExcel&lt;/a&gt; was opaque to me, as are most man pages on UNIX systems. Maybe it's just that I'm dense, or don't have enough patience. Anyway, after much experimentation, I finally "cracked the code" and was able to come up with the following little script to convert an Excel spreadsheet into a delimited text file.&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;# parse_excel.pl Read an Excel spreadsheet and print its contents to&lt;br /&gt;# a bar delimited file&lt;br /&gt;# Created 10/19/04 by P Lembo&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use Spreadsheet::ParseExcel;&lt;br /&gt;&lt;br /&gt;my $HOME = "/u01/home/ldapcon";&lt;br /&gt;my $xlsFile = "$HOME/data/admin/ArrowOIDRegistry.xls";&lt;br /&gt;my $txtFile = "$HOME/data/admin/oid-registry.txt";&lt;br /&gt;&lt;br /&gt;my $wkBook =  Spreadsheet::ParseExcel::Workbook-&gt;Parse($xlsFile);&lt;br /&gt;&lt;br /&gt;open FH, "&gt;$txtFile" or die $!;&lt;br /&gt;&lt;br /&gt;my $nuSheets = $wkBook-&gt;{SheetCount};&lt;br /&gt;print "There are $nuSheets sheets in this workbook\n";&lt;br /&gt;&lt;br /&gt;# Iterate through worksheets&lt;br /&gt;for ( my $iSheet=0; $iSheet &lt; $wkBook-&gt;{SheetCount}; $iSheet++ ) {&lt;br /&gt;&lt;br /&gt;    my $wkSheet = $wkBook-&gt;Worksheet($iSheet);&lt;br /&gt;    my $wksName = $wkSheet-&gt;{Name};&lt;br /&gt;&lt;br /&gt;    print "Name of worksheet is $wksName\n";&lt;br /&gt;   &lt;br /&gt;    # Now iterate through a worksheet by row &lt;br /&gt;    for (my $iRow=0; $iRow &lt; $wkSheet-&gt;{MaxRow}; $iRow++ ) {&lt;br /&gt;&lt;br /&gt;	my $colNu = $wkSheet-&gt;{MaxCol};&lt;br /&gt;&lt;br /&gt;	# Loop through the columns in the row&lt;br /&gt;	for (my $iCol=0; $iCol &lt; $wkSheet-&gt;{MaxCol}; $iCol++ ) {&lt;br /&gt;	&lt;br /&gt;	# Pull out the cell value	&lt;br /&gt;	my $wksCell = $wkSheet-&gt;{Cells}[$iRow][$iCol];&lt;br /&gt;	&lt;br /&gt;	# Print each value&lt;br /&gt;  	print FH $wksCell-&gt;Value, if ($wksCell);&lt;br /&gt;&lt;br /&gt;	# Print a delimiter after each value except the last in the row&lt;br /&gt;	print FH "\|", if ($iCol &lt; ($colNu - 1));&lt;br /&gt;	&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;     # Print a newline after each row&lt;br /&gt;     print FH "\n";&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;print FH "\n":&lt;br /&gt;&lt;br /&gt;close FH;&lt;br /&gt;&lt;br /&gt;__END__;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109821500638218871?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109821500638218871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109821500638218871'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/10/using-spreadsheetparseexcel.html' title='Using Spreadsheet::ParseExcel'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109772407847227378</id><published>2004-10-13T23:06:00.000-04:00</published><updated>2007-06-12T14:17:49.233-04:00</updated><title type='text'>Mixing Metaphors: LDAP and ADSI at work</title><content type='html'>I just finished writing a cgi to provide a barebones web based password reset facility for Active Directory as a backup to my groups "approved" COTS solution. As I noted in my &lt;a href="http://plembo.blogspot.com"&gt;personal blog&lt;/a&gt;, working with ADSI through Perl's' Win32::OLE module was a challenge. For now the code I'll be posting here will provide a standby capability for production. If I have time later on I'd like to eliminate the Win32::OLE pieces altogether and do everything with Net::LDAP. That won't be possible until SSL is enabled in our Active Directory environment, something that probably won't be entertained by the Windows engineering team until next year.&lt;br /&gt;&lt;br /&gt;So, without further ado, here is the code:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;#!perl -w&lt;br /&gt;# adpassreset.cgi Reset Active Directory passwords&lt;br /&gt;# 10/1/04 by P Lembo&lt;br /&gt;# Give choice of unlocking, forcing or both (default)&lt;br /&gt;# version 0.01&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use CGI;&lt;br /&gt;use CGI::Carp qw(fatalsToBrowser);&lt;br /&gt;use URI::URL;&lt;br /&gt;use Net::LDAP;&lt;br /&gt;use Net::LDAP::Entry;&lt;br /&gt;use Win32::OLE;&lt;br /&gt;$Win32::OLE::Warn = 3;&lt;br /&gt;&lt;br /&gt;my $q = CGI-&gt;new;&lt;br /&gt;&lt;br /&gt;require "../etc/ldapapp.conf";&lt;br /&gt;&lt;br /&gt;our ($adsTestHost,$adsQualHost,$adsProdHost,$adsTestPath,&lt;br /&gt;$adsQualPath,$adsProdPath,$adsUsr,$adsPass);&lt;br /&gt;&lt;br /&gt;my @adshosts = ("$adsTestHost","$adsQualHost","$adsProdHost");&lt;br /&gt;my @adsbases = ("$adsTestPath","$adsQualPath","$adsProdPath");&lt;br /&gt;my $newpass = 'yellow';&lt;br /&gt;&lt;br /&gt;my $webhost = "localhost";&lt;br /&gt;my $webport = "80";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if ($q-&gt;param('Review')) {&lt;br /&gt;&lt;br /&gt; give_status($q);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;elsif ($q-&gt;param('Reset Account')) {&lt;br /&gt; &lt;br /&gt; reset_user($q);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;else {&lt;br /&gt;&lt;br /&gt;    show_main($q);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub show_main {&lt;br /&gt;&lt;br /&gt;  print $q-&gt;header;&lt;br /&gt;  print $q-&gt;start_html(-title=&gt;'Active Directory Account Reset',&lt;br /&gt;     -style=&gt;{'src'=&gt;'/styles/ldapadmin.css'}&lt;br /&gt;     );&lt;br /&gt;  print $q-&gt;h1("Active Directory Account Reset");&lt;br /&gt;   &lt;br /&gt;  my $action = $q-&gt;url;&lt;br /&gt;  print $q-&gt;start_form(-method=&gt;'POST',&lt;br /&gt;      -action=&gt;$action,&lt;br /&gt;            );&lt;br /&gt;&lt;br /&gt;  print $q-&gt;h4("Select Server");&lt;br /&gt;  print $q-&gt;popup_menu(-name=&gt;'adshost',&lt;br /&gt;     -values=&gt;\@adshosts&lt;br /&gt;     );&lt;br /&gt;  &lt;br /&gt;  print $q-&gt;h4("Choose Domain");&lt;br /&gt;  print $q-&gt;popup_menu(-name=&gt;'adsbase',&lt;br /&gt;    -values=&gt;\@adsbases&lt;br /&gt;       );&lt;br /&gt;       &lt;br /&gt;  print $q-&gt;h4("Enter User ID");&lt;br /&gt;  print $q-&gt;textfield(-name=&gt;'userid',-size=&gt;5);&lt;br /&gt;  print $q-&gt;p();&lt;br /&gt;  print $q-&gt;submit('Review');&lt;br /&gt;  print $q-&gt;reset("Cancel");&lt;br /&gt;&lt;br /&gt;  print $q-&gt;end_form;&lt;br /&gt;  print $q-&gt;p();&lt;br /&gt;  print $q-&gt;a( { -href =&gt; "/acctadmin/index.html" },&lt;br /&gt; "Back To Active Directory Tools");&lt;br /&gt;  print $q-&gt;end_html();&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;} # main&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;sub give_status {&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;  print $q-&gt;header(-charset=&gt;'UTF-8');&lt;br /&gt;  print $q-&gt;start_html(-title=&gt;'Active Directory Account Reset',&lt;br /&gt;  -style=&gt;{'src'=&gt;'/styles/ldapadmin.css'}&lt;br /&gt;      );&lt;br /&gt;  print $q-&gt;h1("Active Directory Account Reset");&lt;br /&gt;  print $q-&gt;h3("Confirm User Information");&lt;br /&gt;  my $action = $q-&gt;url;&lt;br /&gt;  print $q-&gt;start_form(-method=&gt;'POST',&lt;br /&gt;                 -action=&gt;$action,&lt;br /&gt;           );&lt;br /&gt;  &lt;br /&gt;  my $adshost = $q-&gt;param('adshost');&lt;br /&gt;  my $adsbase = $q-&gt;param('adsbase');&lt;br /&gt;  my $userid = $q-&gt;param('userid');&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt;  print $q-&gt;hidden(-name=&gt;"adshost",value=&gt;"$adshost");&lt;br /&gt;  print $q-&gt;hidden(-name=&gt;"adsbase",value=&gt;"$adsbase");&lt;br /&gt;  print $q-&gt;hidden(-name=&gt;"userid",value=&gt;"$userid");&lt;br /&gt;  &lt;br /&gt;  print $q-&gt;p("Working on $adshost");&lt;br /&gt;  print $q-&gt;p("$adsbase");&lt;br /&gt; &lt;br /&gt;  $adsUsr = "$adsUsr,$adsbase";&lt;br /&gt;&lt;br /&gt;  my $basedn = $adsbase;&lt;br /&gt;  my @attrs = qw(displayname cn userprincipalname samaccountname);&lt;br /&gt;  my $filter = "(|(samaccountname=$userid)(cn=$userid))";&lt;br /&gt;  &lt;br /&gt;  my $ldap = Net::LDAP-&gt;new($adshost, version =&gt;'3');&lt;br /&gt;  my $mesg = $ldap-&gt;bind($adsUsr, password =&gt; $adsPass);&lt;br /&gt;  &lt;br /&gt;  $mesg = $ldap-&gt;search(base =&gt; $basedn,&lt;br /&gt;    scope =&gt; 'sub',&lt;br /&gt;    filter =&gt; $filter,&lt;br /&gt;    attrs =&gt; \@attrs&lt;br /&gt;     );&lt;br /&gt;    &lt;br /&gt;    if ( $mesg-&gt;count &lt;1 ) {&lt;br /&gt;        &lt;br /&gt;        print $q-&gt;h4("No results returned!");&lt;br /&gt;    &lt;br /&gt;    } # if&lt;br /&gt;&lt;br /&gt;  elsif ( $mesg-&gt;count &gt;1 ) {&lt;br /&gt;  &lt;br /&gt;  print $q-&gt;p("Please choose from one of the entries listed and retry");&lt;br /&gt;  &lt;br /&gt;  while (my $entry = $mesg-&gt;shift_entry()) {&lt;br /&gt;   my $userdn = $entry-&gt;dn;   &lt;br /&gt;   my $cn = $entry-&gt;get_value('cn');&lt;br /&gt;   my $displayname = $entry-&gt;get_value('displayname');&lt;br /&gt;     print $q-&gt;p("&lt;strong&gt;$userdn&lt;/strong&gt;");&lt;br /&gt;     print $q-&gt;p("UserID: $userid",$q-&gt;br, "Full Name: $displayname");&lt;br /&gt;      }&lt;br /&gt;         } &lt;br /&gt;   &lt;br /&gt;  else { &lt;br /&gt;    &lt;br /&gt;               my $entry = $mesg-&gt;shift_entry(); &lt;br /&gt;      my $userdn = $entry-&gt;dn;&lt;br /&gt;      print $q-&gt;hidden(-name=&gt;"userdn",value=&gt;"$userdn");&lt;br /&gt;      my $cn = $entry-&gt;get_value('cn');&lt;br /&gt;        print $q-&gt;hidden(-name=&gt;"cn",value=&gt;"$cn");&lt;br /&gt;        my $displayname = $entry-&gt;get_value('displayname');&lt;br /&gt;        print $q-&gt;hidden(-name=&gt;"displayname",value=&gt;"$displayname");&lt;br /&gt;        my $userprincipalname = $entry-&gt;get_value('userprincipalname');&lt;br /&gt;      print $q-&gt;hidden(-name=&gt;"userprincipalname",value=&gt;"$userprincipalname");&lt;br /&gt;&lt;br /&gt;        print $q-&gt;p("&lt;strong&gt;$userdn&lt;/strong&gt;");&lt;br /&gt;        print $q-&gt;p("UserID: $userid",$q-&gt;br, "Full Name: $displayname");&lt;br /&gt;   &lt;br /&gt;       &lt;br /&gt;      # Bind using ADSI to check flags&lt;br /&gt;        my $ldapObj = Win32::OLE-&gt;GetObject('LDAP:');&lt;br /&gt;        my $usrObj = $ldapObj-&gt;OpenDSObject("LDAP://$adshost/$userdn","$adsUsr", "$adsPass", 1);&lt;br /&gt; &lt;br /&gt;          if ($usrObj-&gt;AccountDisabled == 1) {&lt;br /&gt;       print $q-&gt;p("&lt;strong&gt;Account is disabled&lt;/strong&gt;, contact System Administrator");&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      if ($usrObj-&gt;{IsAccountLocked} == 1) {&lt;br /&gt;                print $q-&gt;p("Account is locked, reset will unlock");&lt;br /&gt;        }&lt;br /&gt;        else {&lt;br /&gt;         print $q-&gt;p("Account not locked");&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;      print $q-&gt;p();&lt;br /&gt;            print $q-&gt;submit('Reset Account');&lt;br /&gt;                    print $q-&gt;reset("Cancel");&lt;br /&gt; &lt;br /&gt;     }&lt;br /&gt;  &lt;br /&gt;  $ldap-&gt;unbind;&lt;br /&gt;&lt;br /&gt;  print $q-&gt;end_form;&lt;br /&gt; &lt;br /&gt;  print $q-&gt;p();&lt;br /&gt;    &lt;br /&gt;  print $q-&gt;a( { -href =&gt; '/acctadmin/adacctreset.cgi' }, 'Try Again');&lt;br /&gt;  print $q-&gt;p();&lt;br /&gt;  print $q-&gt;a( { -href =&gt; "/acctadmin/index.html" }, "Back To Help Desk Tools");&lt;br /&gt;  print $q-&gt;end_html;&lt;br /&gt;  &lt;br /&gt;} # status&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;sub reset_user {&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  print $q-&gt;header(-charset=&gt;'UTF-8');&lt;br /&gt;  print $q-&gt;start_html(-title=&gt;'Active Directory Account Reset',&lt;br /&gt;    -style=&gt;{'src'=&gt;'/styles/ldapadmin.css'}&lt;br /&gt;        );&lt;br /&gt;  print $q-&gt;h1("Active Directory Account Reset");&lt;br /&gt;  print $q-&gt;h3("Confirming Changes");&lt;br /&gt;  &lt;br /&gt;  my $adshost = $q-&gt;param('adshost');&lt;br /&gt;  my $adsbase = $q-&gt;param('adsbase');&lt;br /&gt;  my $userdn = $q-&gt;param('userdn');&lt;br /&gt;  my $cn = $q-&gt;param('cn');&lt;br /&gt;  my $displayname = $q-&gt;param('displayname');&lt;br /&gt;  my $userprincipalname = $q-&gt;param('userprincipalname');&lt;br /&gt;    &lt;br /&gt;  print $q-&gt;p("Working on $adshost");&lt;br /&gt;  &lt;br /&gt;  print "&lt;strong&gt;$userdn&lt;/strong&gt;&lt;p&gt;\n";&lt;br /&gt;  print "$displayname&lt;p&gt;\n";&lt;br /&gt;  &lt;br /&gt;  $adsUsr = "$adsUsr,$adsbase";&lt;br /&gt;&lt;br /&gt;  # Bind using ADSI to reset password&lt;br /&gt;  my $ldapObj = Win32::OLE-&gt;GetObject('LDAP:');&lt;br /&gt;  my $usrObj = $ldapObj-&gt;OpenDSObject("LDAP://$adshost/$userdn","$adsUsr", "$adsPass", 1);&lt;br /&gt;&lt;br /&gt;  # Check for disabled account&lt;br /&gt;  if ($usrObj-&gt;AccountDisabled == 1) {&lt;br /&gt;     print $q-&gt;p("&lt;strong&gt;Account is still disabled&lt;/strong&gt;, contact System Administrator");&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  # Unlock account&lt;br /&gt;  if ($usrObj-&gt;{IsAccountLocked} == 1) {&lt;br /&gt;      $usrObj-&gt;{IsAccountLocked} = 0;&lt;br /&gt;      $usrObj-&gt;SetInfo;&lt;br /&gt;      print $q-&gt;p("Account unlocked");&lt;br /&gt;  }&lt;br /&gt;  else {&lt;br /&gt;      print$q-&gt;p( "Account not locked");&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  # Reset password&lt;br /&gt;  $usrObj-&gt;SetPassword($newpass);&lt;br /&gt;  $usrObj-&gt;SetInfo;&lt;br /&gt;  print $q-&gt;p("Password reset to $newpass");&lt;br /&gt;&lt;br /&gt;  # Forces change password on next logon &lt;br /&gt;  $usrObj-&gt;Put('pwdLastSet', 0);&lt;br /&gt;  $usrObj-&gt;SetInfo;  &lt;br /&gt;  print $q-&gt;p("User must change password at next logon");&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;  print $q-&gt;p();&lt;br /&gt;  &lt;br /&gt;  print $q-&gt;a( { -href =&gt; '/acctadmin/adacctreset.cgi' }, 'Try Again');&lt;br /&gt;  print $q-&gt;p();&lt;br /&gt;  print $q-&gt;a( { -href =&gt; "/acctadmin/index.html" }, "Back To Active Directory Tools");&lt;br /&gt;  print $q-&gt;end_html;&lt;br /&gt; &lt;br /&gt;   &lt;br /&gt;} # reset&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;__END__;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109772407847227378?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109772407847227378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109772407847227378'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/10/mixing-metaphors-ldap-and-adsi-at-work.html' title='Mixing Metaphors: LDAP and ADSI at work'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109667781275699911</id><published>2004-10-01T20:21:00.000-04:00</published><updated>2004-10-01T20:53:28.556-04:00</updated><title type='text'>Red Hat buying Netscape Directory, Certificate Servers</title><content type='html'>It's official. &lt;a href="http://www.redhat.com"&gt;Red Hat&lt;/a&gt; has posted a &lt;a href="http://www.redhat.com/about/presscenter/2004/press_neighbor.html"&gt;press release&lt;/a&gt; announcing a deal to acquire Netscape's Directory and Certificate servers from AOL/Netscape. This is &lt;em&gt;real&lt;/em&gt; good news for those of us in the LDAP business. The &lt;a href="http://slashdot.org"&gt;Slashdot&lt;/a&gt; &lt;a href="http://linux.slashdot.org/article.pl?sid=04/09/30/169253&amp;tid=110&amp;tid=114&amp;tid=98&amp;tid=1&amp;tid=218"&gt;post &lt;/a&gt;on this from 9/30/04 had over 200 replies, which just goes to show there is indeed intelligent life in the universe.&lt;br /&gt;&lt;br /&gt;As a fairly satisfied user of Sun's rebranded version of the Netscape Directory server (which they acquired after the dissolution of the iPlanet partnership), I've kept a careful eye on the Netscape version (which has sometimes been hard to find, buried somewhere among a pile of broken links to technologies Netscape no longer supports). It's been pretty clear for a long time that AOL wasn't even trying to market these Netscape properties, and at least from a "maintaining balance in the universe" standpoint its good to see they will be going to a home where they won't be wasted.&lt;br /&gt;&lt;br /&gt;The other good part is that these products will soon be open sourced, and made available for deployment on advanced Linux systems like the upcoming Red Hat Enterprise 4. AOL/Netscape did not support Linux on its latest versions, and Sun has only paid lipservice to the open source O/S (They &lt;em&gt;claim&lt;/em&gt; their latest version, rebranded "Java System Enterprise Directory", works on the now antiquated Red Hat Enterprise 2.1. Right.). At work this has been an issue because we're now engineering a probable move of most of our web tier to Linux on Intel. Up until now it looked like the directories would have to stay on Solaris/Sparc.&lt;br /&gt;&lt;br /&gt;I'll take a careful look at Red Hat's next release of the Netscape Directory, especially because the schemae and access controls in the Sun and Netscape products are almost identical and as a result the transition in our enterprise would be fairly painless. Interesting contrast here. Some companies. like Oracle, AOL and Novell (remmember WordPerfect? Or UNIXWare? DRDOS?), gobble up others and run them into the ground (beware, PeopleSoft and SuSE customers), others, like Red Hat, give them new life (think &lt;a href="http://www.cygwin.com"&gt; Cygwin&lt;/a&gt; here).&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109667781275699911?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109667781275699911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109667781275699911'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/10/red-hat-buying-netscape-directory.html' title='Red Hat buying Netscape Directory, Certificate Servers'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109582236463257289</id><published>2004-09-21T22:48:00.000-04:00</published><updated>2004-10-30T14:24:50.203-04:00</updated><title type='text'>Tuning the Berkeley DB</title><content type='html'>&lt;a href="http://www.sleepycat.com"&gt;Sleepycat Software&lt;/a&gt;'s Berkeley DB is the most widely used embedded database manager in the world. The latest release of OpenLDAP (v2.2x) uses Berkeley DB (v2.4x) for it's bdb backend.&lt;br /&gt;&lt;br /&gt;With the origina OpenLDAP ldbm backend, database tuning was all done inside the slapd.conf file. Limited configuration of the bdb backend can still be done in slapd.conf, but fine tuning now needs to be done in the standard &lt;strong&gt;DB_CONFIG&lt;/strong&gt; file usually found in the directory specified in slapd.conf by the database section's &lt;em&gt;directory&lt;/em&gt; directive (e.g. /var/db/openldap-data).&lt;br /&gt;&lt;br /&gt;Right now I'm still experimenting with DB_CONFIG, so my configuration is fairly simple. I got the basic framework from the &lt;a href="http://www.openldap.org/faq/data/cache/1072.html"&gt;OpenLDAP FAQ&lt;/a&gt; on the subject. Of course to make it effective I'm going to have to rebuild my 10,000 entry test database, but hey, who needs to break for lunch anyway? I'm setting the cache initially at 64 Mb, to see if this gets me around a bulk loading problem I had during a recent db creation session (I wound up using slapadd to complete the process). Here's the config I'm going to use:&lt;br /&gt;&lt;br /&gt;        # Set the database in memory cache size.&lt;br /&gt;        #&lt;br /&gt;        set_cachesize   0       64000000        0&lt;br /&gt;        #&lt;br /&gt;        # Set database flags.&lt;br /&gt;        # (for database loading/reindexing)               &lt;br /&gt;        #set_flags       DB_TXN_NOSYNC&lt;br /&gt;        #&lt;br /&gt;        # Set log values.&lt;br /&gt;        #&lt;br /&gt;        # set_lg_regionmax        1048576&lt;br /&gt;        # set_lg_max              10485760&lt;br /&gt;        # set_lg_bsize            2097152&lt;br /&gt;        # set_lg_dir              /usr/local/var/openldap-logs&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Late Note: I used this config with my test db as planned, and it did in fact get me past the bulk loading issue I'd been experiencing with OpenLDAP 2.2, working directly with the db config has been a real eye-openner and would make a great chapter in a book someday.&lt;/em&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109582236463257289?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109582236463257289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109582236463257289'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/09/tuning-berkeley-db.html' title='Tuning the Berkeley DB'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109441535502208165</id><published>2004-09-05T16:25:00.000-04:00</published><updated>2004-09-05T16:28:13.973-04:00</updated><title type='text'>Slurpd, you can't get it at 7-11</title><content type='html'>The &lt;a href="http://www.openldap.org"&gt;OpenLDAP&lt;/a&gt; man page for &lt;a href="http://www.openldap.org/doc/admin22/replication.html"&gt; slurpd&lt;/a&gt; defines it as the "Standalone LDAP Update Replication Daemon". And so it is. Longer in production and more mature than its client-side replication cousin, &lt;a href="http://www.openldap.org/doc/admin22/syncrepl.html"&gt;syncrepl&lt;/a&gt;, slurpd provides a server-side "push" of changes from a master LDAP directory to designated replica (or slave) directories.&lt;br /&gt;&lt;br /&gt;The directory service I use in my lab at home does not see alot of changes, so issues such as the relative robustness of slurpd over syncrepl are not really a concern there. Given the interest being shown in open source directory solutions in many places, however, I've begun to kick the tires on the daemon to re-familiarize myself with its inner workings.&lt;br /&gt;&lt;br /&gt;Slurpd is built by default in a stock "configure, make, make install" of OpenLDAP. On &lt;a href="http://www.freebsd.org"&gt;FreeBSD&lt;/a&gt; it gets installed as part of the openldap-server port. While I've never had this problem with a source build on Linux, the current FreeBSD port annoyingly hardcodes the daemon so that it will only work when the replication log file location (set using the replogfile directive in slapd.conf) is set to /var/db/openldap-slurp/replica. What you wind up with in this configuration are a pair of replication log files (one for slapd, the other for slurpd) and their corresponding lock files. When a change gets made on the master, this gets recorded in the slapd replog (in my config, /var/db/openldap-slurp/replica/slapd.replog), and then passed over to the slurpd replog (on my server, /var/db/openldap-slurp/replica/slurpd.replog). When an update fails, a record of it gets written to a separate *.rej log. The data in both replog files is written out in clear text, LDIF (LDAP Data Interchange) format with the requisite LDAP commands, and so should be secured with the same attention as the slapd database itself. This particular method of formatting may make it possible to use these files as part of a custom synchronization system that could work with other vendor directories, such as Active Directory (something I've read has been done at the University of Michigan).&lt;br /&gt;&lt;br /&gt;The slapd.replog file gets purged once slurpd reads it, while the slurpd.replog file maintains a running history of changes made. The latter, which can grow quite large, is therefore a candidate for log rotation by the newsyslog facility in FreeBSD. I've got mine set to top out at 1000 Kb (1 Mb), which is reasonable for my environment. Larger, more active, installations, may need to grow the file bigger.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109441535502208165?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109441535502208165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109441535502208165'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/09/slurpd-you-cant-get-it-at-7-11.html' title='Slurpd, you can&apos;t get it at 7-11'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109387873144530726</id><published>2004-08-30T10:46:00.000-04:00</published><updated>2004-08-30T11:29:51.046-04:00</updated><title type='text'>HP and OpenLDAP</title><content type='html'>Earlier this month the &lt;a href="http://www.openldap.org"&gt;OpenLDAP&lt;/a&gt; Project had their 3rd annual Developer's Day. While I missed the conference myself (I don't travel, and even if I did my employer would have never paid for this one), I found the &lt;a href="http://www.openldap.org/conf/odd-sandiego-2004"&gt;slide presentations&lt;/a&gt; archived on the project site very interesting. One that especially caught my eye was this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.openldap.org/conf/odd-sandiego-2004/Neil.pdf"&gt;www.openldap.org/conf/odd-sandiego-2004/Neil.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The big news to me was that &lt;a href="http://www.hp.com"&gt;HP&lt;/a&gt; is moving off Sun's directory and onto OpenLDAP as their core enterprise directory in October. In fact, as the slides show, they've already made the switch for their extranet. The slides pretty much confirmed my own view of the readiness of OpenLDAP for the enterprise, with most of the same caveats I've raised to my management when we've discussed it. HP's approach was to work with OpenLDAP leader &lt;a href="http://www.symas.com"&gt;Symas Corporation&lt;/a&gt; to develop the enhancements they required. HP's team are the same guys whose homegrown &lt;a href="http://www.hp.com/hps/messaging/mc_ldap.html"&gt;LDAP sync tool&lt;/a&gt;, used during the HP and Compaq merger to sync their disparate directories, can be now purchased by outsiders for $20,000. Two of my remaining reservations, internal application reliance on proprietary features of the Netscape/Sun Directory series (mainly, Server Side Sort) and write performance (OpenLDAP used to be abyssmal, while Sun was always on top), are not addressed in the Developer Day presentation. The former is really a matter for internal standards enforcement, the latter may not be the issue it once was, now that OpenLDAP 2.2 has gone stable with its new Berkeley DB backend.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109387873144530726?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109387873144530726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109387873144530726'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/08/hp-and-openldap.html' title='HP and OpenLDAP'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109159445525840638</id><published>2004-08-04T00:06:00.000-04:00</published><updated>2004-08-04T00:40:55.260-04:00</updated><title type='text'>Samba and LDAP</title><content type='html'>Someone with an eye for detail might have noticed that the smb.conf I had in an earlier post was configured to use the tdbsam instead of the ldapsam backend. While tdbsam is a good alternative to the older smbpasswd backend that mimics a Windows LSA (Local Security Authority) database, it is understandable that one would assume that eldapo would opt for the LDAP backend. Although I've tried this in previous installations of both Samba 2 and Samba 3 (while the latter was still in development), my goal this time around was to get the service up and running as quickly and cleanly as possible.&lt;br /&gt;&lt;br /&gt;With a little time on my hands today, I in fact did take the next step and convert over to the ldapsam backend. After pouring over the doc for awhile I thought I understood what to do, which I did -- pretty much.&lt;br /&gt;&lt;br /&gt;First, I added the samba 3 schema file to my OpenLDAP instance's schema subdirectory and made the necessary changes to my slapd.conf (including adding an access control and indexes to support the new objectclass and attributes needed by Samba). Then I edited my smb.conf to add the LDAP related directives. Finally, I moved the Samba account information for my existing users over from tdbsam to LDAP.&lt;br /&gt;&lt;br /&gt;For slapd.conf, the following lines got added:&lt;br /&gt;&lt;br /&gt;At the top of the file:&lt;br /&gt;&lt;br /&gt;include         /usr/local/etc/openldap/schema/samba.schema&lt;br /&gt;&lt;br /&gt;Above the database settings section:&lt;br /&gt;&lt;br /&gt;# Limited access to Samba account attributes&lt;br /&gt;access to attr=sambalmpassword,sambantpassword,sambapwdlastset,sambaacctflags,&lt;br /&gt;sambalogontime,sambalogofftime,sambakickofftime,sambapwdcanchange,&lt;br /&gt;sambapwdmustchange,sambahomepath,sambahomedrive,sambaprofilepath,&lt;br /&gt;sambauserworkstations,sambaprimarygroupsid,sambadomainname,sambasid&lt;br /&gt;        by group/groupofuniquenames/uniquemember="cn=Administrators,dc=lembo,dc=ny,dc=us" write&lt;br /&gt;        by self write&lt;br /&gt;&lt;br /&gt;At the end of the database settings section:&lt;br /&gt;&lt;br /&gt;# Samba v3 schema attributes&lt;br /&gt;index sambasid eq&lt;br /&gt;index sambaprimarygroupsid eq&lt;br /&gt;index sambadomainname eq&lt;br /&gt;&lt;br /&gt;I ran the command slapindex -f /usr/local/etc/openldap/slapd.conf to create the new indexes on the directory.&lt;br /&gt;&lt;br /&gt;Here are the additional lines in the global section of smb.conf:&lt;br /&gt;&lt;br /&gt;passdb backend = ldapsam&lt;br /&gt;ldap admin dn = "cn=manager,dc=lembo,dc=ny,dc=us"&lt;br /&gt;ldap ssl = start tls&lt;br /&gt;ldap delete dn = no&lt;br /&gt;ldap user suffix = ou=People&lt;br /&gt;ldap group suffix = ou=Groups&lt;br /&gt;ldap machine suffix =  ou=Computers&lt;br /&gt;ldap idmap suffix = ou=Domains&lt;br /&gt;ldap suffix = dc=lembo,dc=ny,dc=us&lt;br /&gt;ldap filter = (uid=%u)&lt;br /&gt;&lt;br /&gt;Pretty standard stuff. I did have to use smbpasswd as root to add the "cn=manager" root directory account's password to the database before switching over. To migrate the existing tdbsam data to ldapsam I used the Samba pdbedit tool thusly:&lt;br /&gt;&lt;br /&gt;pdbedit -i tdbsam -e ldapsam&lt;br /&gt;&lt;br /&gt;For those users who did not have a previous account on tdbsam I used the smbpasswd utility to add them, which then wrote the requisite information into the user's corresponding LDAP entry.&lt;br /&gt;&lt;br /&gt;Note that for now at least I have not enabled  "ldap sync" to maintain both Samba and LDAP passwords automatically. This is mostly due to initial caution on my part. I know this feature does in fact work. What I'm really interested in in synching the Samba and UNIX passwords. Previously I was running FreeBSD 4.x, which does not support PAM (Pluggable Authentication Modules), a critical part of that feature. Now that I've moved everything to FreeBSD 5.2, I'm going to be researching how to configure PAM for this purpose. For now, I'll continue to maintain the 3 different passwords independantly, using native tools (passwd for UNIX, ldappasswd for LDAP and smbpasswd).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109159445525840638?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109159445525840638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109159445525840638'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/08/samba-and-ldap.html' title='Samba and LDAP'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109144446873391989</id><published>2004-08-02T06:58:00.000-04:00</published><updated>2007-06-08T16:47:19.276-04:00</updated><title type='text'>A sample slapd.conf</title><content type='html'>This is a sample slapd.conf for those who might be interested in a bdb back-end, monitor, some basic access controls and indexes (Note: the stock stylesheet that I use on this site cuts off some of the line ends unless you maximize your browser):&lt;br /&gt;&lt;blockquote&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;include  /usr/local/etc/openldap/schema/core.schema&lt;br /&gt;include  /usr/local/etc/openldap/schema/cosine.schema&lt;br /&gt;include  /usr/local/etc/openldap/schema/inetorgperson.schema&lt;br /&gt;include  /usr/local/etc/openldap/schema/nis.schema&lt;br /&gt;include  /usr/local/etc/openldap/schema/samba.schema&lt;br /&gt;&lt;br /&gt;# Define global ACLs to disable default read access.&lt;br /&gt;&lt;br /&gt;# Do not enable referrals until AFTER you have a working directory&lt;br /&gt;# service AND an understanding of referrals.&lt;br /&gt;#referral ldap://root.openldap.org&lt;br /&gt;&lt;br /&gt;pidfile  /var/run/openldap/slapd.pid&lt;br /&gt;argsfile /var/run/openldap/slapd.args&lt;br /&gt;&lt;br /&gt;# Load dynamic backend modules:&lt;br /&gt;# modulepath /usr/local/libexec/openldap&lt;br /&gt;# moduleload back_bdb.la&lt;br /&gt;# moduleload back_ldap.la&lt;br /&gt;# moduleload back_ldbm.la&lt;br /&gt;# moduleload back_passwd.la&lt;br /&gt;# moduleload back_shell.la&lt;br /&gt;&lt;br /&gt;# Sample security restrictions&lt;br /&gt;# Require integrity protection (prevent hijacking)&lt;br /&gt;# Require 112-bit (3DES or better) encryption for updates&lt;br /&gt;# Require 63-bit encryption for simple bind&lt;br /&gt;# security ssf=1 update_ssf=112 simple_bind=64&lt;br /&gt;&lt;br /&gt;# Sample access control policy:&lt;br /&gt;# Root DSE: allow anyone to read it&lt;br /&gt;# Subschema (sub)entry DSE: allow anyone to read it&lt;br /&gt;# Other DSEs:&lt;br /&gt;#  Allow self write access&lt;br /&gt;#  Allow authenticated users read access&lt;br /&gt;#  Allow anonymous users to authenticate&lt;br /&gt;# Directives needed to implement policy:&lt;br /&gt;#&lt;br /&gt;# if no access controls are present, the default policy is:&lt;br /&gt;# Allow read by all&lt;br /&gt;#&lt;br /&gt;# rootdn can always write!&lt;br /&gt;&lt;br /&gt;# Custom access controls - created 12/31/03 by P Lembo&lt;br /&gt;# Read access to root dse by all&lt;br /&gt;access to dn=""&lt;br /&gt; by * read&lt;br /&gt;&lt;br /&gt;# Access by all to schema&lt;br /&gt;access to dn.base="cn=subschema"&lt;br /&gt; by * read&lt;br /&gt;&lt;br /&gt;# Access to monitor by all&lt;br /&gt;access to dn.base="cn=monitor"&lt;br /&gt;   by * read&lt;br /&gt;&lt;br /&gt;# Limited access to password&lt;br /&gt;access to attr=userpassword&lt;br /&gt; by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt; by self write&lt;br /&gt; by users auth&lt;br /&gt; by anonymous auth&lt;br /&gt;&lt;br /&gt;# Limited access to Posix account attributes&lt;br /&gt;access to attr=uidnumber,gidnumber,homedirectory,loginshell,gecos&lt;br /&gt; by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt; by self read&lt;br /&gt;&lt;br /&gt;# Limited access to Samba account attributes&lt;br /&gt;access to attr=lmpassword,ntpassword,pwdlastset,acctflags,logontime,logofftime,kickofftime,&lt;br /&gt;pwdcanchange,pwdmustchange,smbhome,homedrive,profilepath,userworkstations,&lt;br /&gt;primarygroupid,rid&lt;br /&gt; by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt; by self read&lt;br /&gt;&lt;br /&gt;# User access to organizational attributes&lt;br /&gt;access to attr=o,ou,c,description,uniquemember&lt;br /&gt; by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt; by users read&lt;br /&gt;&lt;br /&gt;# Access to public attributes by all&lt;br /&gt;access to attr=uid,c,title&lt;br /&gt; by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt; by users read&lt;br /&gt; by anonymous read&lt;br /&gt;&lt;br /&gt;# Self write access to public attributes  &lt;br /&gt;access to attr=cn,displayname,sn,givenname,mail,telephonenumber,facsimiletelephonenumber&lt;br /&gt; by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt; by self write&lt;br /&gt; by users read&lt;br /&gt; by anonymous read&lt;br /&gt;&lt;br /&gt;# Self write and limited access to private attributes&lt;br /&gt;access to attr=homephone&lt;br /&gt; by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt; by self write&lt;br /&gt; by users read&lt;br /&gt;&lt;br /&gt;# Self write and read access to all other attributes&lt;br /&gt;access to *&lt;br /&gt; by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt; by self write&lt;br /&gt; by users read&lt;br /&gt; by anonymous read&lt;br /&gt;&lt;br /&gt;password-hash {SHA}&lt;br /&gt;&lt;br /&gt;allow bind_v2&lt;br /&gt;sizelimit   200&lt;br /&gt;timelimit   120&lt;br /&gt;# TLS/SSL directives&lt;br /&gt;TLSCertificateFile /usr/local/etc/openldap/newcert.pem&lt;br /&gt;TLSCertificateKeyFile /usr/local/etc/openldap/newkey.pem&lt;br /&gt;TLSCACertificateFile /usr/local/etc/openldap/newca.pem&lt;br /&gt;&lt;br /&gt;#######################################################################&lt;br /&gt;# ldbm database definitions&lt;br /&gt;#######################################################################&lt;br /&gt;# Monitor backend&lt;br /&gt;database        monitor&lt;br /&gt;&lt;br /&gt;# User database&lt;br /&gt;database bdb&lt;br /&gt;suffix  "dc=company,dc=com"&lt;br /&gt;rootdn  "cn=Manager,dc=company,dc=com"&lt;br /&gt;# Cleartext passwords, especially for the rootdn, should&lt;br /&gt;# be avoid.  See slappasswd(8) and slapd.conf(5) for details.&lt;br /&gt;# Use of strong authentication encouraged.&lt;br /&gt;rootpw  {SHA}xxxxxxxxxxxxxxxxxxxxxxxx &lt;br /&gt;# The database directory MUST exist prior to running slapd AND&lt;br /&gt;# should only be accessible by the slapd and slap tools.&lt;br /&gt;# Mode 700 recommended.&lt;br /&gt;directory /var/db/openldap-data&lt;br /&gt;&lt;br /&gt;# Cache directives&lt;br /&gt;cachesize    2000&lt;br /&gt;idlcachesize 4000&lt;br /&gt;# Indices to maintain&lt;br /&gt;index objectclass eq&lt;br /&gt;index cn  eq,pres,sub&lt;br /&gt;index sn  eq,pres,sub&lt;br /&gt;index givenname eq,pres,sub&lt;br /&gt;index mail  eq,pres,sub&lt;br /&gt;index c  eq,pres&lt;br /&gt;index uid  eq,pres&lt;br /&gt;index displayname  eq,pres,sub&lt;br /&gt;index uidnumber  eq&lt;br /&gt;index gidnumber  eq&lt;br /&gt;index memberuid  eq&lt;br /&gt;# Samba v2 schema attribs&lt;br /&gt;index rid  eq&lt;br /&gt;&lt;br /&gt;# Samba v3 schema attributes&lt;br /&gt;# index sambasid eq&lt;br /&gt;# index sambaprimarygroupsid eq&lt;br /&gt;# index sambadomainname eq&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109144446873391989?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109144446873391989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109144446873391989'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/08/sample-slapdconf.html' title='A sample slapd.conf'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109144367209453210</id><published>2004-08-02T06:43:00.000-04:00</published><updated>2004-08-11T10:15:02.320-04:00</updated><title type='text'>FreeBSD-Windows Interoperability Using Samba</title><content type='html'>In the past I've set up Windows machines to talk lpd and NFS to UNIX boxes, but recently I decided to give Samba another try. Many years ago I used Samba 1.x with some success, and was at first frustrated by 3.0, until I stopped using SWAT and other GUI's and did everything from the command line. Here's my smb.conf:&lt;br /&gt;&lt;br /&gt;# Global parameters&lt;br /&gt;[global]&lt;br /&gt;workgroup = WORKGROUP&lt;br /&gt;server string = Samba Server&lt;br /&gt;passdb backend = tdbsam&lt;br /&gt;log file = /var/log/samba/log.%m&lt;br /&gt;max log size = 50&lt;br /&gt;os level = 33&lt;br /&gt;preferred master = yes&lt;br /&gt;domain master = yes&lt;br /&gt;wins support = yes&lt;br /&gt;printing = bsd&lt;br /&gt;load printers = yes&lt;br /&gt;show add printer wizard = yes&lt;br /&gt;use client driver = no&lt;br /&gt;&lt;br /&gt;[printers]&lt;br /&gt;comment = All Printers&lt;br /&gt;path = /var/spool/samba&lt;br /&gt;printable = yes&lt;br /&gt;browseable = yes&lt;br /&gt;public = yes&lt;br /&gt;guest ok = yes&lt;br /&gt;&lt;br /&gt;[share]&lt;br /&gt;path = /usr/local/share&lt;br /&gt;read only = No&lt;br /&gt;&lt;br /&gt;[lp]&lt;br /&gt;comment = gimp/pcl-4;r=300x300;q=medium;c=gray;p=letter;m=auto&lt;br /&gt;path = /var/spool/samba&lt;br /&gt;read only = No&lt;br /&gt;printable = Yes&lt;br /&gt;printer name = lp&lt;br /&gt;use client driver = Yes&lt;br /&gt;oplocks = No&lt;br /&gt;share modes = No&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109144367209453210?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109144367209453210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109144367209453210'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/08/freebsd-windows-interoperability-using.html' title='FreeBSD-Windows Interoperability Using Samba'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109144284206066022</id><published>2004-08-02T06:28:00.000-04:00</published><updated>2004-08-02T06:34:41.843-04:00</updated><title type='text'>eldapo on vacation</title><content type='html'>... for the first time since Y2K. It's hard to believe, but it actually has been 5 years since I took a whole week off at a time. I was a desktop guy during Y2K, testing software and creating images to be deployed on 6,000+ PC's in my company. After a very brief respite, I volunteered to work on our new LDAP directory project. That turned into a full time job, involving way more dedication and hard work than any of us imagined. This summer, though, I thought I owed it to my family -- and myself -- to take some time off. There are a bunch of guys back at the shop who are covering for me this week. Hopefully the population, and the systems, won't be too hard on them. Especially because I'll be wanting them to do it all again at the end of August, when I take my next week off.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109144284206066022?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109144284206066022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109144284206066022'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/08/eldapo-on-vacation.html' title='eldapo on vacation'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-109089583792913553</id><published>2004-07-26T22:30:00.000-04:00</published><updated>2004-08-02T06:28:46.666-04:00</updated><title type='text'>OpenLDAP 2.2 Now Standard for FreeBSD Ports</title><content type='html'>In recognition of &lt;a href="http://www.openldap.org/"&gt;OpenLDAP&lt;/a&gt; 2.2 going stable, the &lt;a href="http://www.freebsd.org/"&gt;  FreeBSD&lt;/a&gt; project has now made it the standard version for the -CURRENT ports tree going forward. This will relieve many of us of the extra work needed to hack dependant ports so they would accept 2.2 in place of the previous standard, 2.1 (which is still what you'll get -- for now -- in the FreeBSD -STABLE branch or in the packages that shipped with -RELEASE). Eldapo thanks the talented engineers over at the FreeBSD project for this most intelligent decision.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-109089583792913553?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109089583792913553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/109089583792913553'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/07/openldap-22-now-standard-for-freebsd.html' title='OpenLDAP 2.2 Now Standard for FreeBSD Ports'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-108975279233802028</id><published>2004-07-13T16:55:00.000-04:00</published><updated>2004-07-18T14:12:33.903-04:00</updated><title type='text'>OpenLDAP 2.2 STABLE</title><content type='html'>&lt;a href="http://www.openldap.org"&gt;OpenLDAP&lt;/a&gt; version 2.2 has gone STABLE! While I've been running it for a few months, its finally good to be able to recommend it for production use. Among the features it now offers to OpenLDAP users for the first time are LDAP Sync and Simple Paged Results Control. Still missing are Server Side Sort and Multi-Master replication, but the project leads continue to insist that this is &lt;em&gt;A Good Thing (TM)&lt;/em&gt;. Being in the midst of moving my own app dev people away from SSS, I wholeheartedly agree on the former. Why should I give up precious RAM and CPU cycles so the app server will look faster than it really is? MMR is another thing, but so far I am inclined to the view that it is not a critical feature, and that finite developer time would be more effectively used in other areas for now. Microsoft and Novell marketing have been beating Sun up for years on this, but like so many other "value-adds" from closed-source vendors, it really is something we can mostly do without.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;LDAP Sync is another matter. While implemented in 2.2 as a way for consumer directories to "pull" updates from suppliers, it has the potential for allowing syncrhonization between directories of different vendors -- something that has up to now been impossible. It also invites the possibility of client-side synchronization by mail clients and PDAs. ELDAPO is pleased. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-108975279233802028?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/108975279233802028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/108975279233802028'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/07/openldap-22-stable.html' title='OpenLDAP 2.2 STABLE'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-7619661.post-108972930098159974</id><published>2004-07-13T10:33:00.000-04:00</published><updated>2004-07-13T10:35:00.980-04:00</updated><title type='text'>OpenLDAP Access Controls</title><content type='html'>At work we don't use &lt;a href="http://www.openldap.org"&gt;OpenLDAP&lt;/a&gt; -- yet. But that doesn't keep me from continuing to experiment with what I consider the best LDAP directory software available today.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Perhaps one of the most daunting tasks of a neophyte OpenLDAP administrator is properly setting up access controls. Although acknowledged by all to be "powerful", the regex style ACL syntax used by OpenLDAP are a real stumbling block to many. The primary rule to be observed is that once an attribute or dn has had rights to it defined, any subsequent attempt to define access will be ineffective. Failure to define the access of a particular category of user (users, self, anonymous) will result in a denial of access. I found that ordering my rules from specific to general according to logical groupings of dns or attributes to be the most effective strategy. These groupings usually relate to who should be able to see and write to particular attributes or dns. For example, the following control&lt;br /&gt;&lt;br /&gt;access to attr=uid,c,title&lt;br /&gt;    by group/groupofuniquenames/uniquemember=&lt;br&gt;             "cn=Administrators,dc=example,dc=com" write&lt;br /&gt;    by users read&lt;br /&gt;    by anonymous read&lt;br /&gt;&lt;br /&gt;will result in title &lt;em&gt;only&lt;/em&gt; being writable by admins, and &lt;em&gt;only&lt;/em&gt; being readable by authenticated users (write implies read, which also implies search). Users cannot write to the attribute. Everyone else (anonymous) will be unable to see it at all. Note the unintuitive syntax for defining a group's rights -- I have the author of &lt;a href="http://www.wlug.org.nz/OpenLdapAccessControls"&gt;this WLUG Wiki&lt;/a&gt; to thank for leading me to the correct string to use. Also note that in an actual access&lt;br /&gt;control the "by" line would not contain a line break.&lt;br /&gt;&lt;br /&gt;Following is a default set of ACLs I recently implemented in production. Keep in mind that for formatting purposes I've put line breaks here. Lines beginning with "access to" or "by" should continue without breaking in an actual slapd.conf file.&lt;br /&gt;&lt;br /&gt;# Custom access controls - created 12/31/03 by P Lembo&lt;br /&gt;# Read access to root dse by all&lt;br /&gt;access to dn=""&lt;br /&gt;	by * read&lt;br /&gt;&lt;br /&gt;# Access by all to schema&lt;br /&gt;access to dn.base="cn=subschema"&lt;br /&gt;	by * read&lt;br /&gt;&lt;br /&gt;# Access to monitor by all&lt;br /&gt;access to dn.base="cn=monitor"&lt;br /&gt;        by * read&lt;br /&gt;&lt;br /&gt;# Limited access to password&lt;br /&gt;access to attr=userpassword&lt;br /&gt;	by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt;	by self write&lt;br /&gt;	by users auth&lt;br /&gt;	by anonymous auth&lt;br /&gt;&lt;br /&gt;# Limited access to Posix account attributes&lt;br /&gt;access to attr=uidnumber,gidnumber,homedirectory,loginshell,gecos&lt;br /&gt;	by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt;	by self read&lt;br /&gt;&lt;br /&gt;# Limited access to Samba account attributes&lt;br /&gt;access to attr=lmpassword,ntpassword,pwdlastset,acctflags,logontime,logofftime,&lt;br&gt;&lt;br /&gt;kickofftime,pwdcanchange,pwdmustchange,smbhome,homedrive,profilepath,&lt;br&gt;&lt;br /&gt;userworkstations,primarygroupid,rid&lt;br /&gt;	by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt;	by self read&lt;br /&gt;&lt;br /&gt;# User access to organizational attributes&lt;br /&gt;access to attr=o,ou,c,description,uniquemember&lt;br /&gt;	by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt;	by users read&lt;br /&gt;&lt;br /&gt;# Access to public attributes by all&lt;br /&gt;access to attr=uid,c,title&lt;br /&gt;	by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt;	by users read&lt;br /&gt;	by anonymous read&lt;br /&gt;&lt;br /&gt;# Self write access to public attributes		&lt;br /&gt;access to attr=cn,displayname,sn,givenname,mail,telephonenumber,facsimiletelephonenumber&lt;br /&gt;	by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt;	by self write&lt;br /&gt;	by users read&lt;br /&gt;	by anonymous read&lt;br /&gt;&lt;br /&gt;# Self write and limited access to private attributes&lt;br /&gt;access to attr=homephone&lt;br /&gt;	by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt;	by self write&lt;br /&gt;	by users read&lt;br /&gt;&lt;br /&gt;# Self write and read access to all other attributes&lt;br /&gt;access to *&lt;br /&gt;	by group/groupofuniquenames/uniquemember="cn=Administrators,dc=company,dc=com" write&lt;br /&gt;	by self write&lt;br /&gt;	by users read&lt;br /&gt;	by anonymous read&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7619661-108972930098159974?l=eldapo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/108972930098159974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7619661/posts/default/108972930098159974'/><link rel='alternate' type='text/html' href='http://eldapo.blogspot.com/2004/07/openldap-access-controls.html' title='OpenLDAP Access Controls'/><author><name>Phil Lembo</name><uri>http://www.blogger.com/profile/12903060124984753907</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://3.bp.blogspot.com/-VNNlDkeT8Fo/TkS1Zt7SGqI/AAAAAAAAAYg/fL92Tvd-VI8/s220/philnew_sm.png'/></author></entry></feed>
