# Many problems with slapd (samba 3.6 + ldap + smbldap-tools)



## belcayre (Jun 27, 2012)

Hi everybody,

I have many problems with slapd:

When I try to lau*n*ch on my pdc I have the error code:

```
root@iutge1-pdc: /usr/local/libexec service slapd start
Starting slapd.
Bus error
/usr/local/etc/rc.d/slapd: WARNING: failed to start slapd
```

When I try to add a user I have that 

```
root@iutge1-pdc: /usr/local/libexec smbpasswd -a admin
failed to bind to server ldap://127.0.0.1/ with dn="cn=samba,ou=DSA,dc=pdc,dc=grenoble,dc=fr" Error: Can't contact LDAP server
```

When I try to use smbldap-tools I have this error:

```
root@iutge1-pdc: /usr/local/libexec smbldap-userlist
erreur LDAP: Can't contact master ldap server for writing (IO::Socket::INET: connect: Invalid argument)
 at /usr/local/lib/perl5/site_perl/5.10.1/smbldap_tools.pm line 347.
```

*T*hanks for reading.
*H*ave a nice day.


----------



## SirDice (Jun 27, 2012)

belcayre said:
			
		

> ```
> root@iutge1-pdc: /usr/local/libexec service slapd start
> ```


What's part of your prompt and what isn't?

There should be a #, $ or > denoting the end of the prompt.

Adding users and what not is rather pointless if the service refuses to start in the first place.


----------



## belcayre (Jun 27, 2012)

*H*ello, thanks for this quick reply. *Y*es, if you prefer:

```
root@iutge1-pdc:# service slapd start
```



> Adding users and what not is rather pointless if the service refuses to start in the first place


*Y*es, this is only a try, beacause I don't understand the problem of slapd.


----------



## kisscool-fr (Jun 27, 2012)

Have you checked what is in openldap log file?


----------



## acheron (Jun 27, 2012)

Hi Fabien,

What is the content of /var/log/debug?
Have you done some upgrade of your packages recently?
Do you have enough space on the var partition?


----------



## SirDice (Jun 27, 2012)

What version of FreeBSD and for what architecture? How did you install net/openldap24-server? Or did you use a different version?


----------



## belcayre (Jun 27, 2012)

Sorry I forget to specify: this a new install of FreeB*SD* 9 amd64 (my first on freebsd FreeBSD), I have installed by ports:

```
samba36-3.6.5
openldap-sasl-client-2.4.31_1
openldap-sasl-server-2.4.31
nss_ldap-1.265_7
smbldap-tools-0.9.8
```
So I don't make upgrades and only 2% used of my /var (5 GB).

*I*n /var/log/debug I have that:

```
Jun 27 14:29:59 iutge1-pdc slapd: slapd stopped.
Jun 27 14:29:59 iutge1-pdc slapd: connections_destroy: nothing to destroy.
Jun 27 14:30:08 iutge1-pdc slapd[19439]: @(#) $OpenLDAP: slapd 2.4.31 (Jun 27 2012 11:28:37) $  
root@iutge1-pdc.ujf-grenoble.fr:/usr/ports/net/openldap24-server/work/openldap-2.4.31/servers/slapd
```

I try to install net/openldap24-server but need openldap24-sasl-client so I install openldap24-sasl-client and openldap24-sasl-server.
Do you think this is the problem? *T*omorrow I will try openldap23-server.

*T*hanks of your answers.


----------



## SirDice (Jun 27, 2012)

Did you use an alternate compiler like CLANG or GCC 4.6? Are there any CFLAGS and similar in /etc/make.conf?


----------



## acheron (Jun 27, 2012)

Why do you need the SASL version?


----------



## kisscool-fr (Jun 27, 2012)

What do you have before the line slapd stopped in /var/log/debug?


----------



## belcayre (Jun 28, 2012)

Hi everybody,

I don't need SASL version that's why I *make install* again without SASL, and I delete in my /etc/make.conf:

```
PERL_VERSION=5.10.1
WITHOUT_LIB32=YES
```

Now it works, and slapd is now running.
Thanks for your help.


----------

