I am trying to use the ppolicy overlay. I've searched, read and experimented and can't get it to work. I've read other similar postings with similar problems but haven't found the one with the answer.
My OpenLDAP knowledge is intermediate.
I download 2.3.27, then build it:
env LIBS="-L/usr/bin" \ ./configure \ --prefix=/usr/local \ --libdir=/usr/local/lib \ --sbindir=/usr/sbin \ --libexecdir=/usr/sbin \ --sysconfdir=/etc \ --localstatedir=/var/lib/ldap \ --enable-overlays=mod \ --enable-dynamic=yes \ --enable-modules=yes \ --enable-ppolicy=yes && make depend && make
I include ppolicy in slapd.conf.
include /etc/openldap/schema/ppolicy.schema overlay ppolicy ppolicy_default "cn=Standard Policy,ou=Policies,c=us" ppolicy_hash_cleartext ppolicy_use_lockout
I have tried with and without modulepath and moduleload. I suspect they are not needed but am not sure.
modulepath /usr/sbin moduleload ppolicy.la
I have created a policy structure in my repository.
I don't really care if ppolicy is statically or dynamically loaded, I just want it to be available! The problem may be that I really don't get the meaning or dependencies of enable-dynamic, enable-modules, enable-overlays, enable-static, enable-shared.
My goal is simple : to get ppolicy working in the simplest way.
Problems:
/etc/init.d/ldap start --
WARNING: No dynamic config support for overlay ppolicy.
This apparently is more than just a "warning" because startup fails.
I figured Symas CDS silver would work, so I downloaded it, commented out the ppolicy lines:
# Load an instance of the ppolicy overlay for the current database: overlay ppolicy ppolicy_default "cn=Standard Policy,ou=Policies,c=us" ppolicy_hash_cleartext ppolicy_use_lockout
and put -d -1 into EXTRA_SLAPD_ARGS so I could see what happens.
With this:
# Uncomment the following moduleload to add support for # password policies. Refer to the example below and to # slapo-ppolicy(5) for additional information. moduleload ppolicy.la
I get:
line 93 (moduleload ppolicy.la) lt_dlopenext failed: (ppolicy.la) file not found /opt/symas/etc/openldap/slapd.conf: line 93: <moduleload> handler exited with 1!
With this:
#moduleload ppolicy.la
I get this:
line 234 (overlay ppolicy) overlay "ppolicy" not found /opt/symas/etc/openldap/slapd.conf: line 234: <overlay> handler exited with 1!
What makes this all the more frustrating is that test022-ppolicy appears to work fine. I have examined its .conf file and environment variables, etc and can't extract the secret.
Questions:
1) Where is ppolicy.la located? 2) Does it need to be loaded? 3) Where is the path to it specified? 4) When are moduleload specs needed? 5) Are env variables needed to find ppolicy.la? 6) What's the secret? 7) When will the book be published?
All advice welcome.
Thanks, Roger Metcalf
--On Monday, January 22, 2007 1:08 PM -0500 "Metcalf, Roger" roger.metcalf@acs-inc.com wrote:
I am trying to use the ppolicy overlay. I've searched, read and experimented and can't get it to work. I've read other similar postings with similar problems but haven't found the one with the answer.
My OpenLDAP knowledge is intermediate.
I download 2.3.27, then build it:
Why 2.3.27? 2.3.32 is the current stable release.
Plus there have been fixes since 2.3.27:
OpenLDAP 2.3.30 Release (2006/11/14) Fixed slapo-ppolicy external quality check (ITS#4741)
OpenLDAP 2.3.29 Release (2006/11/10) Fixed slapo-ppolicy leaks (ITS#4665)
OpenLDAP 2.3.28 Release (2006/10/21) Fixed slapo-ppolicy pwdChangedTime behavior (ITS#4692)
As for your questions:
Questions:
1) Where is ppolicy.la located?
Well, if its a dynamic module, then in $lib/openldap:
ldap00:/usr/local/lib/openldap> ls -l ppol* lrwxrwxrwx 1 root root 21 Nov 13 22:38 ppolicy-2.3.so.0 -> ppolicy-2.3.so.0.2.16* -rwxr-xr-x 1 root root 102169 Nov 8 21:49 ppolicy-2.3.so.0.2.16* -rwxr-xr-x 1 root root 909 Nov 8 21:49 ppolicy.la* lrwxrwxrwx 1 root root 21 Nov 13 22:38 ppolicy.so -> ppolicy-2.3.so.0.2.16*
2) Does it need to be loaded?
Yes, if it is a dynamic module.
3) Where is the path to it specified?
Via the "modulepath" directive in slapd.conf:
# Load dynamic backend modules: modulepath /usr/local/lib/openldap moduleload back_hdb.la moduleload back_monitor.la
4) When are moduleload specs needed?
Not sure what you mean here.
5) Are env variables needed to find ppolicy.la?
No.
6) What's the secret?
Reading the man pages and other documentation.
7) When will the book be published?
Howard is currently working on writing it.
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
Metcalf, Roger wrote:
I am trying to use the ppolicy overlay. I've searched, read and experimented and can't get it to work. I've read other similar postings with similar problems but haven't found the one with the answer.
My OpenLDAP knowledge is intermediate.
I download 2.3.27, then build it:
env LIBS="-L/usr/bin" \ ./configure \ --prefix=/usr/local \ --libdir=/usr/local/lib \ --sbindir=/usr/sbin \ --libexecdir=/usr/sbin \ --sysconfdir=/etc \ --localstatedir=/var/lib/ldap \ --enable-overlays=mod \ --enable-dynamic=yes \ --enable-modules=yes \ --enable-ppolicy=yes && make depend && make
Setting "--enable-overlays=mod" turns on all of the overlays, building them as dynamically loadable modules. However, setting "--enable-ppolicy=yes" overrides that setting, and causes the ppolicy overlay to be built statically. For slapd backends and overlays, "yes" means build the feature and build it statically. "mod" means build the feature and build it dynamically.
I include ppolicy in slapd.conf.
include /etc/openldap/schema/ppolicy.schema overlay ppolicy ppolicy_default "cn=Standard Policy,ou=Policies,c=us" ppolicy_hash_cleartext ppolicy_use_lockout
Without seeing more context from your slapd.conf, I'd guess you've put the overlay configuration in the wrong place.
I have tried with and without modulepath and moduleload. I suspect they are not needed but am not sure.
modulepath /usr/sbin moduleload ppolicy.la
As the slapd.conf(5) manpage states, these directives are only needed for access to dynamically loaded modules. Since you configured ppolicy static, this moduleload directive will fail.
I have created a policy structure in my repository.
I don't really care if ppolicy is statically or dynamically loaded, I just want it to be available! The problem may be that I really don't get the meaning or dependencies of enable-dynamic, enable-modules, enable-overlays, enable-static, enable-shared.
Have you tried "configure --help" already? --enable-shared and --enable-static are standard options on most autoconf-based software. If you don't understand these, you can find them in the autoconf documentation. If you don't understand the significance of static libraries vs shared libraries, you need to do some reading on computing basics. Teaching those basics is way outside the scope of OpenLDAP.
--enable-dynamic is explained clearly in configure --help: --enable-dynamic enable linking built binaries with dynamic libs [no] The default "no" means that by default, the OpenLDAP binaries will be linked with static libraries. Whether or not you actually enable the creation of shared libraries, only the static ones will be used.
--enable-modules enable dynamic module support [no] This should be fairly obvious too - if you don't enable this, then OpenLDAP cannot use dynamically loaded modules. And slapd.conf(5) also says pretty clearly: moduleload <filename> Specify the name of a dynamically loadable module to load. ... This option and the modulepath option are only usable if slapd was compiled with --enable-modules.
--enable-overlays enable all available overlays no|yes|mod I already explained this above.
My goal is simple : to get ppolicy working in the simplest way.
Problems:
/etc/init.d/ldap start --
WARNING: No dynamic config support for overlay ppolicy.
This apparently is more than just a "warning" because startup fails.
No, it's just a warning, and has nothing to do with your other problems.
I figured Symas CDS silver would work, so I downloaded it, commented out the ppolicy lines:
line 234 (overlay ppolicy) overlay "ppolicy" not found /opt/symas/etc/openldap/slapd.conf: line 234: <overlay> handler exited with 1!
Last time I checked, we don't bundle the ppolicy overlay in CDS Silver. You need to subscribe to CDS Gold to get all of the overlays. So naturally it would not be found.
What makes this all the more frustrating is that test022-ppolicy appears to work fine. I have examined its .conf file and environment variables, etc and can't extract the secret.
There are no secrets. You just have to actually read and pay attention to the details.
I recall reading somewhere that human speech naturally involves a great deal of redundancy, which allows people to hear and comprehend each other even in very noisy environments. The same applies to written text; you can drop most vowels and even a lot of consonants from written English and still be understood.
The same is not true for computer software. If you omit or misplace even a single character the entire meaning is lost. Likewise in the documentation, if you skim it or skip even a single sentence then you'll have missed a crucial point.
One of the basic recipes for public speaking is "tell them what you're going to tell them, tell them, then tell them what you told them." Again, redundancy is built in. We don't have the time or resources to be so redundant in writing the documentation. We write the essential information once, and every word is relevant. Life is too short, we don't have time to repeat what has already been written.
Quanah has already responded to the rest of this email, so I'll stop here.
Questions:
- Where is ppolicy.la located?
- Does it need to be loaded?
- Where is the path to it specified?
- When are moduleload specs needed?
- Are env variables needed to find ppolicy.la?
- What's the secret?
- When will the book be published?
All advice welcome.
Thanks, Roger Metcalf
openldap-software@openldap.org