[Samba] cannot access LDAP when not root

Ganael LAPLANCHE ganael.laplanche at edfgdf.fr
Tue Jul 29 08:20:47 GMT 2003


Hi,

I found strange errors in my samba logs :

[2003/07/28 16:32:16, 0] lib/smbldap.c:smbldap_open(799)
  smbldap_open: cannot access LDAP when not root..
[2003/07/28 16:32:16, 1] lib/smbldap.c:smbldap_retry_open(888)
  Connection to LDAP Server failed for the 1 try!
[2003/07/28 16:32:16, 0] passdb/pdb_ldap.c:ldapsam_search_one_group(1634)
  ldapsam_search_one_group: Problem during the LDAP search: LDAP error:
(Insufficient access)ldapsam_search_one_group: searching for:
[(&(objectClass=sambaGroupMapp
ing)(gidNumber=-1))]

Exploring the source code, I found It was related to the euid of samba
(file lib/smbldap.c) :

#ifndef NO_LDAP_SECURITY
        if (geteuid() != 0) {
                DEBUG(0, ("smbldap_open: cannot access LDAP when not root..
\n"));
                return  LDAP_INSUFFICIENT_ACCESS;
        }
#endif

NO_LDAP_SECURITY was not defined during compilation... How could I resolve
the problem ? How could I have an euid of 0 running samba ?

Thank you very much,

Ganaël.





More information about the samba mailing list