1. make sure ruby-ldap gem is installed
2. test via ldapsearch where puppetmasterd is installed
Also reviewing the wiki will also help:
http://www.reductivelabs.com/trac/puppet/wiki/LDAPNodes
-L
--
Larry Ludwig
err: Could not prefetch user provider 'ldap': Could not set up LDAP
Connection: Missing ruby/ldap libraries
> 2. test via ldapsearch where puppetmasterd is installed
>
This works since I am using LDAP via pam to allow access to the systems.
But ldapsearch also works.
> Also reviewing the wiki will also help:
>
> http://www.reductivelabs.com/trac/puppet/wiki/LDAPNodes
>
The symptoms that I see are that puppet is not requesting a full DN
though. It's 'forgetting' to append ldapbase to the end of the query so
it's unsurprising that it is not working.
--
Trevor Hemsley
Infrastructure Engineer
.................................................
* C A L Y P S O
* 4th Floor, Tower Point,
44 North Road,
Brighton, BN1 1YR, UK
OFFICE +44 (0) 1273 666 350
FAX +44 (0) 1273 666 351
.................................................
www.calypso.com
This electronic-mail might contain confidential information intended
only for the use by the entity named. If the reader of this message is
not the intended recipient, the reader is hereby notified that any
dissemination, distribution or copying is strictly prohibited.
* P * /*/ Please consider the environment before printing this e-mail /*/
>
> Larry Ludwig wrote:
>> Hi two suggestions:
>>
>> 1. make sure ruby-ldap gem is installed
>>
> It is. On a different system without ruby-ldap installed I get
>
> err: Could not prefetch user provider 'ldap': Could not set up LDAP
> Connection: Missing ruby/ldap libraries
>
>>
> The symptoms that I see are that puppet is not requesting a full DN
> though. It's 'forgetting' to append ldapbase to the end of the query
> so
> it's unsurprising that it is not working.
>
Hmm in my openldap ldap.conf file I defined the base dn, I don't
remember if that was done for any specific reason.
I would check the source code to see if it helps you determine what
the error may be.
What version of Puppetmaster are you using on what platform, with what
LDAP?
At the moment I'm not sure what is the root cause of your error.
>
-L
--
Larry Ludwig
[root@myhost]# cat /etc/redhat-release
CentOS release 5.2 (Final)
[root@myhost]# rpm -q openldap-servers
openldap-servers-2.3.27-8.el5_2.4
[root@myhost]# grep -v "^#" /etc/ldap.conf | grep -v "^$"
base dc=myorg,dc=org
timelimit 120
bind_timelimit 120
idle_timelimit 3600
nss_initgroups_ignoreusers
root,ldap,named,avahi,haldaemon,dbus,radvd,tomcat,radiusd,news,mailman
uri ldaps://ldap.myorg.company.com/
ssl on
tls_cacertdir /etc/openldap/cacerts
pam_password crypt
[root@myhost]# cat /etc/openldap/ldap.conf
URI ldaps://ldap.myorg.company.com/
BASE dc=myorg,dc=org
TLS_CACERTDIR /etc/openldap/cacerts
[root@myhost]# ruby -rldap -e 'puts :installed'
installed
[root@myhost]# ruby -rpuppet -e 'p Puppet.features.ldap?'
true
Much experimentation later... fixed, I had to specify the ldapxxx =
parameters in the [puppetd] stanza of /etc/puppet/puppet.conf to make it
work. e.g
[puppetd]
ldapserver=ldap.myorg.company.com
ldapbase=dc=myorg,dc=org
ldapuser=cn=admin,dc=myorg,dc=org
ldappassword=mysecret
>
> [puppetd]
> ldapserver=ldap.myorg.company.com
> ldapbase=dc=myorg,dc=org
> ldapuser=cn=admin,dc=myorg,dc=org
> ldappassword=mysecret
>
In my case it's in [puppetmasterd] but glad it works for you.
-L
--
Larry Ludwig
Heh, both of you should probably put it in main. :)
You need to either put it in main, the section named after the
environment, or the section named after the executable, and (here's
the key) you want it in the most general block possible.
If there's no harm in putting it in main, you should *always* do so.
Otherwise, only the named executable will have access to those settings.
--
Morgan's Second Law:
To a first approximation all appointments are canceled.
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
>
> On Mar 1, 2009, at 9:27 PM, Larry Ludwig wrote:
>
>>
>>
>> On Mar 1, 2009, at 9:04 PM, Trevor Hemsley wrote:
>>
>>>
>>> [puppetd]
>>> ldapserver=ldap.myorg.company.com
>>> ldapbase=dc=myorg,dc=org
>>> ldapuser=cn=admin,dc=myorg,dc=org
>>> ldappassword=mysecret
>>>
>>
>>
>> In my case it's in [puppetmasterd] but glad it works for you.
>
>
> Heh, both of you should probably put it in main. :)
>
> You need to either put it in main, the section named after the
> environment, or the section named after the executable, and (here's
> the key) you want it in the most general block possible.
>
> If there's no harm in putting it in main, you should *always* do so.
>
> Otherwise, only the named executable will have access to those
> settings.
>
What other app in puppet uses LDAP?
-L
puppetmasterd looks in ldap for node information, and puppetd can
manage users and groups in ldap.
--
A lot of people mistake a short memory for a clear conscience.
-- Doug Larson