Wiki seems to be out of date here. The wiki reference's [1] [2] a "setup/provision-backend" script, as well as a "setup/provision" script, yet current git only has a setup/provision executable. Some #samba and #openldap IRC advice was that provision-backend wasnt needed anymore, but based off the errors i'm seeing, there's definitely _something_ missing, I just dont know if that something ( /usr/local/samba4/private/ldap/slapd.d/ files ) ought to be provided by the missing setup/provision-backend. [1] http://wiki.samba.org/index.php/Samba4/LDAP_Backend/OpenLDAP [2] http://wiki.samba.org/index.php/Samba4/HOWTO/Ubuntu_Server_9.04 Following IRC advice, I attempted to just use the setup/provision script. It didnt work. I added a "[running]" print to provisionbackend.py, to see what it was running, so I could attempt to run slapd as it was running it, with debugging enabled. Heres the result: rektide at deneb:~/archives/samba/source4$ setup/provision --realm=ELDERGODS.COM --ldap-backend-type=openldap --server-role=dc --domain=ELDERGODS --slapd-path='/usr/sbin/slapd' [running] '/usr/sbin/slapd' '-F/usr/local/samba4/private/ldap/slapd.d' '-h' 'ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi' Failed to bind - LDAP client internal error: NT_STATUS_UNEXPECTED_NETWORK_ERROR Failed to connect to 'ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi' Traceback (most recent call last): File "setup/provision", line 213, in <module> nosync=opts.nosync,ldap_dryrun_mode=opts.ldap_dryrun_mode) File "bin/python/samba/provision.py", line 1257, in provision provision_backend.start() File "bin/python/samba/provisionbackend.py", line 252, in start raise ProvisioningError("slapd died before we could make a connection to it") NameError: global name 'ProvisioningError' is not defined rektide at deneb:~/archives/samba/source4$ rektide at deneb:~/archives/samba/source4$ rektide at deneb:~/archives/samba/source4$ '/usr/sbin/slapd' '-F/usr/local/samba4/private/ldap/slapd.d' '-h' 'ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi' -d 32767 @(#) $OpenLDAP: slapd 2.4.17 (Nov 10 2009 19:58:41) $ buildd at nautilus:/build/buildd/openldap-2.4.17/debian/build/servers/slapd ldap_pvt_gethostbyname_a: host=deneb, r=0 daemon_init: ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi daemon_init: listen on ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi daemon_init: 1 listeners to open... ldap_url_parse_ext(ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi) daemon: listener initialized ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi daemon_init: 1 listeners opened ldap_create slapd init: initiated server. slap_sasl_init: initialized! backend_startup_one: starting "cn=config" ldif_read_file: no entry file "/usr/local/samba4/private/ldap/slapd.d/cn=config.ldif" send_ldap_result: conn=-1 op=0 p=0 send_ldap_result: err=32 matched="" text="" slapd destroy: freeing system resources. slapd stopped. connections_destroy: nothing to destroy. The /usr/local/samba4/private/ldap/slapd.d/ directory is completely empty. I'm not sure what is supposed to populate this, but as can be seen from the above debug logs, the slapd kicked off by setup/provision is definitely expecting there to be contents. This could very well be a result of the missing-in-action setup/provision-backend script. I'll be happy to do some wiki updating if I can get this issue resolved: the OpenLDAP wiki entry's last major work was the Ides of June 2008. Regards, rektide
Wiki seems to be out of date here. The wiki reference's [1] [2] a "setup/provision-backend" script, as well as a "setup/provision" script, yet current git only has a setup/provision executable. Some #samba and #openldap IRC advice was that provision-backend wasnt needed anymore, but based off the errors i'm seeing, there's definitely _something_ missing, I just dont know if that something ( /usr/local/samba4/private/ldap/slapd.d/ files ) ought to be provided by the missing setup/provision-backend. [1] http://wiki.samba.org/index.php/Samba4/LDAP_Backend/OpenLDAP [2] http://wiki.samba.org/index.php/Samba4/HOWTO/Ubuntu_Server_9.04 Following IRC advice, I attempted to just use the setup/provision script. It didnt work. I added a "[running]" print to provisionbackend.py, to see what it was running, so I could attempt to run slapd as it was running it, with debugging enabled. Heres the result: rektide at deneb:~/archives/samba/source4$ setup/provision --realm=ELDERGODS.COM --ldap-backend-type=openldap --server-role=dc --domain=ELDERGODS --slapd-path='/usr/sbin/slapd' [running] '/usr/sbin/slapd' '-F/usr/local/samba4/private/ldap/slapd.d' '-h' 'ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi' Failed to bind - LDAP client internal error: NT_STATUS_UNEXPECTED_NETWORK_ERROR Failed to connect to 'ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi' Traceback (most recent call last): File "setup/provision", line 213, in <module> nosync=opts.nosync,ldap_dryrun_mode=opts.ldap_dryrun_mode) File "bin/python/samba/provision.py", line 1257, in provision provision_backend.start() File "bin/python/samba/provisionbackend.py", line 252, in start raise ProvisioningError("slapd died before we could make a connection to it") NameError: global name 'ProvisioningError' is not defined rektide at deneb:~/archives/samba/source4$ rektide at deneb:~/archives/samba/source4$ rektide at deneb:~/archives/samba/source4$ '/usr/sbin/slapd' '-F/usr/local/samba4/private/ldap/slapd.d' '-h' 'ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi' -d 32767 @(#) $OpenLDAP: slapd 2.4.17 (Nov 10 2009 19:58:41) $ buildd at nautilus:/build/buildd/openldap-2.4.17/debian/build/servers/slapd ldap_pvt_gethostbyname_a: host=deneb, r=0 daemon_init: ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi daemon_init: listen on ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi daemon_init: 1 listeners to open... ldap_url_parse_ext(ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi) daemon: listener initialized ldapi://%2Fusr%2Flocal%2Fsamba4%2Fprivate%2Fldap%2Fldapi daemon_init: 1 listeners opened ldap_create slapd init: initiated server. slap_sasl_init: initialized! backend_startup_one: starting "cn=config" ldif_read_file: no entry file "/usr/local/samba4/private/ldap/slapd.d/cn=config.ldif" send_ldap_result: conn=-1 op=0 p=0 send_ldap_result: err=32 matched="" text="" slapd destroy: freeing system resources. slapd stopped. connections_destroy: nothing to destroy. The /usr/local/samba4/private/ldap/slapd.d/ directory is completely empty. I'm not sure what is supposed to populate this, but as can be seen from the above debug logs, the slapd kicked off by setup/provision is definitely expecting there to be contents. This could very well be a result of the missing-in-action setup/provision-backend script. I'll be happy to do some wiki updating if I can get this issue resolved: the OpenLDAP wiki entry's last major work was the Ides of June 2008. Regards, rektide