I'm trying to get Samba up but I can't seem to get the LDAP connection
working correctly. I can run a search from ldapsearch, but samba is
complaining that it can't connect.
Here's the error from log.smbd
[2004/12/29 16:04:04, 0] lib/smbldap.c:smbldap_connect_system(850)
failed to bind to server with dn= cn=Manager Error: Invalid
credentials
[2004/12/29 16:04:04, 1] lib/smbldap.c:another_ldap_try(990)
Connection to LDAP server failed for the 1 try!
my smb.conf file:
[global]
interfaces = eth0 10.1.0.143/24
workgroup = STROZTEST
netbios name = AUTH
passdb backend = ldapsam:ldaps://10.1.0.143:636
username map = /etc/samba/smbusers
printcap name = cups
add user script = /usr/local/samba/sbin/smbldap-useradd.pl -m '%u'
delete user script = /usr/local/samba/sbin/smbldap-userdel.pl %u
add group script = /usr/local/samba/sbin/smbldap-groupadd.pl -p '%g'
delete group script = /usr/local/samba/sbin/smbldap-groupdel.pl '%g'
add user to group script = /usr/local/samba/sbin/ \
smbldap-groupmod.pl -m '%g' '%u'
delete user from group script = /usr/local/samba/sbin/ \
smbldap-groupmod.pl -x '%g' '%u'
set primary group script = /usr/local/samba/sbin/ \
smbldap-usermod.pl -g '%g' '%u'
add machine script = /usr/local/samba/sbin/smbldap-useradd.pl -w '%u'
logon script = scripts\logon.bat
logon path = \\%L\Profiles\%U
#logon drive = H:
#logon home = \\%L\%U
domain logons = Yes
os level = 35
preferred master = Yes
domain master = Yes
ldap suffix = dc=strozllc,dc=com
ldap machine suffix = ou=People
ldap user suffix = ou=People
ldap group suffix = ou=People
ldap idmap suffix = ou=People
ldap admin dn = cn=Manager
ldap ssl = yes
ldap passwd sync = Yes
idmap uid = 15000-20000
idmap gid = 15000-20000
winbind separator = +
#printing = cups
and my slapd.conf file:
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/samba.schema
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/openldap/run/slapd.pid
argsfile /var/openldap/run/slapd.args
# Load dynamic backend modules:
# modulepath /usr/sbin/openldap
# moduleload back_bdb.la
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la
# Sample security restrictions
# Require integrity protection (prevent hijacking)
# Require 112-bit (3DES or better) encryption for updates
# Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
# allow the "ldap admin dn" access, but deny everyone else
#access to attrs=lmPassword, ntPassword
# by dn="cn=Samba Admin,ou=People,dc=strozllc,dc=com" write
# by * none
#######################################################################
# BDB database definitions
#######################################################################
database bdb
suffix "dc=strozllc,dc=com"
rootdn "cn=Manager,dc=strozllc,dc=com"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# Change password with 'slappasswd -h {Md5}'
rootpw {MD5}xxxxxxxxxxxxxxxxxxxxxxxxxxxx
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/openldap/openldap-data
# Use crypt to has the passwords
#password-hash {crypt}
# Define SSL and TLS properties
TLSCertificateFile /etc/ssl/ldap.pem
TLSCertificateKeyFile /etc/openldap/ssl/ldap.pem
TLSCACertificateFile /etc/ssl/ldap.pem
# Indices to maintain
index objectClass eq
index cn pres,sub,eq
index sn pres,sub,eq
index uid pres,sub,eq
index displayName pres,sub,eq
index uidNumber eq
index gidNumber eq
index memberUid eq
index sambaSID eq
index sambaPrimaryGroupSID eq
index sambaDomainName eq
index default sub
#######################################################################
# replication via slurpd(8)
#######################################################################
# master server configuration
#replogfile /var/openldap/openldap-slurp
#replica-pidfile /var/openldap/slurpd.pid
#replica host=slave.example.com:389
# binddn="cn=admin,dc=example,dc=org"
# bindmethod=simple credentials=secret
# slave server(s) configuration
#updatedn "cn=admin,dc=example,dc=org"
#updateref ldap://master.example.org
David Sonenberg
Systems / Network Administrator
Stroz Friedberg, LLC
15 Maiden Lane, Suite 1208
New York, NY 10038
212.981.6527 (o) | 917.495.4918 (c)
Sorry if I'm stating the obvious, but you did run smbpasswd -w to set the password properly? (Going by memory so double check the flag ) Duncan Quoting David Sonenberg <dsonenberg@strozllc.com>:> I'm trying to get Samba up but I can't seem to get the LDAP connection > working correctly. I can run a search from ldapsearch, but samba is > complaining that it can't connect. > > Here's the error from log.smbd > [2004/12/29 16:04:04, 0] lib/smbldap.c:smbldap_connect_system(850) > failed to bind to server with dn= cn=Manager Error: Invalid > credentials > > [2004/12/29 16:04:04, 1] lib/smbldap.c:another_ldap_try(990) > Connection to LDAP server failed for the 1 try! >----------------------------------------------------------------- University of St Andrews Webmail: http://webmail.st-andrews.ac.uk
Don't apologize, the obvious is the best place to start. Yes I did set the password by typing smbpasswd -w. David Sonenberg Systems / Network Administrator Stroz Friedberg, LLC 15 Maiden Lane, Suite 1208 New York, NY 10038 212.981.6527 (o) | 917.495.4918 (c) -----Original Message----- From: dbb@st-andrews.ac.uk [mailto:dbb@st-andrews.ac.uk] Sent: Thursday, December 30, 2004 9:44 AM To: David Sonenberg Cc: OpenLDAP-Software@openldap.org; samba@lists.samba.org Subject: Re: [Samba] Openldap + Samba 3 PDC Sorry if I'm stating the obvious, but you did run smbpasswd -w to set the password properly? (Going by memory so double check the flag ) Duncan Quoting David Sonenberg <dsonenberg@strozllc.com>:> I'm trying to get Samba up but I can't seem to get the LDAP connection> working correctly. I can run a search from ldapsearch, but samba is > complaining that it can't connect. > > Here's the error from log.smbd > [2004/12/29 16:04:04, 0] lib/smbldap.c:smbldap_connect_system(850) > failed to bind to server with dn= cn=Manager Error: Invalid > credentials > > [2004/12/29 16:04:04, 1] lib/smbldap.c:another_ldap_try(990) > Connection to LDAP server failed for the 1 try! >----------------------------------------------------------------- University of St Andrews Webmail: http://webmail.st-andrews.ac.uk
> I'm trying to get Samba up but I can't seem to get the LDAP connection > working correctly. I can run a search from ldapsearch, but samba is > complaining that it can't connect.Can you actually do an ldapsearch? NOT ANONYMOUSLY but binding as the DN the DC will use?> Here's the error from log.smbd > [2004/12/29 16:04:04, 0] lib/smbldap.c:smbldap_connect_system(850) > failed to bind to server with dn= cn=Manager Error: Invalid > credentialsYour DCs bind DN is "cn=Manager"? It think you forgot to setup this part.
I'm new to ldap. What should I set my DC's DN to, admin? Anyway here's the results of a ldapsearch. ldapsearch -D "cn=Manager,dc=strozllc,dc=com" -W # extended LDIF # # LDAPv3 # base <> with scope sub # filter: (objectclass=*) # requesting: ALL # # strozllc.com dn: dc=strozllc,dc=com objectClass: dcObject objectClass: organization dc: strozllc o: Strozllc Com Network description: Stroz Friedberg LLC # Manager, strozllc.com dn: cn=Manager,dc=strozllc,dc=com objectClass: organizationalRole cn: Manager description: Directory Manager # People, strozllc.com dn: ou=People,dc=strozllc,dc=com objectClass: top objectClass: organizationalUnit ou: People # admin, People, strozllc.com dn: cn=admin,ou=People,dc=strozllc,dc=com cn: admin objectClass: top objectClass: organizationalRole objectClass: simpleSecurityObject userPassword:: xxxxxxxxxxxxxxxxxxxxxxxxxxxx # Groups, strozllc.com dn: ou=Groups,dc=strozllc,dc=com objectClass: top objectClass: organizationalUnit ou: Groups # admin, Groups, strozllc.com dn: cn=admin,ou=Groups,dc=strozllc,dc=com cn: admin objectClass: top objectClass: organizationalRole objectClass: simpleSecurityObject userPassword:: xxxxxxxxxxxxxxxxxxxxxxxxxxxx # Computers, strozllc.com dn: ou=Computers,dc=strozllc,dc=com objectClass: top objectClass: organizationalUnit ou: Computers # admin, Computers, strozllc.com dn: cn=admin,ou=Computers,dc=strozllc,dc=com cn: admin objectClass: top objectClass: organizationalRole objectClass: simpleSecurityObject userPassword:: xxxxxxxxxxxxxxxxxxxxxxxxxxxx # search result search: 2 result: 0 Success # numResponses: 9 # numEntries: 8 David Sonenberg Systems / Network Administrator Stroz Friedberg, LLC 15 Maiden Lane, Suite 1208 New York, NY 10038 212.981.6527 (o) | 917.495.4918 (c) -----Original Message----- From: awilliam@whitemice.org [mailto:awilliam@whitemice.org] Sent: Thursday, December 30, 2004 9:47 AM To: David Sonenberg Cc: OpenLDAP-Software@OpenLDAP.org; samba@lists.samba.org Subject: Re: [Samba] Openldap + Samba 3 PDC> I'm trying to get Samba up but I can't seem to get the LDAP connection> working correctly. I can run a search from ldapsearch, but samba is > complaining that it can't connect.Can you actually do an ldapsearch? NOT ANONYMOUSLY but binding as the DN the DC will use?> Here's the error from log.smbd > [2004/12/29 16:04:04, 0] lib/smbldap.c:smbldap_connect_system(850) > failed to bind to server with dn= cn=Manager Error: Invalid > credentialsYour DCs bind DN is "cn=Manager"? It think you forgot to setup this part.
I tried changing the DN to cn=admin but that didn't work either. Could it have anything to do with the fact that I used md5 for the password hash? David Sonenberg Systems / Network Administrator Stroz Friedberg, LLC 15 Maiden Lane, Suite 1208 New York, NY 10038 212.981.6527 (o) | 917.495.4918 (c) -----Original Message----- From: samba-bounces+dsonenberg=strozllc.com@lists.samba.org [mailto:samba-bounces+dsonenberg=strozllc.com@lists.samba.org] On Behalf Of David Sonenberg Sent: Thursday, December 30, 2004 9:59 AM To: awilliam@whitemice.org Cc: samba@lists.samba.org; OpenLDAP-Software@OpenLDAP.org Subject: RE: [Samba] Openldap + Samba 3 PDC I'm new to ldap. What should I set my DC's DN to, admin? Anyway here's the results of a ldapsearch. ldapsearch -D "cn=Manager,dc=strozllc,dc=com" -W # extended LDIF # # LDAPv3 # base <> with scope sub # filter: (objectclass=*) # requesting: ALL # # strozllc.com dn: dc=strozllc,dc=com objectClass: dcObject objectClass: organization dc: strozllc o: Strozllc Com Network description: Stroz Friedberg LLC # Manager, strozllc.com dn: cn=Manager,dc=strozllc,dc=com objectClass: organizationalRole cn: Manager description: Directory Manager # People, strozllc.com dn: ou=People,dc=strozllc,dc=com objectClass: top objectClass: organizationalUnit ou: People # admin, People, strozllc.com dn: cn=admin,ou=People,dc=strozllc,dc=com cn: admin objectClass: top objectClass: organizationalRole objectClass: simpleSecurityObject userPassword:: xxxxxxxxxxxxxxxxxxxxxxxxxxxx # Groups, strozllc.com dn: ou=Groups,dc=strozllc,dc=com objectClass: top objectClass: organizationalUnit ou: Groups # admin, Groups, strozllc.com dn: cn=admin,ou=Groups,dc=strozllc,dc=com cn: admin objectClass: top objectClass: organizationalRole objectClass: simpleSecurityObject userPassword:: xxxxxxxxxxxxxxxxxxxxxxxxxxxx # Computers, strozllc.com dn: ou=Computers,dc=strozllc,dc=com objectClass: top objectClass: organizationalUnit ou: Computers # admin, Computers, strozllc.com dn: cn=admin,ou=Computers,dc=strozllc,dc=com cn: admin objectClass: top objectClass: organizationalRole objectClass: simpleSecurityObject userPassword:: xxxxxxxxxxxxxxxxxxxxxxxxxxxx # search result search: 2 result: 0 Success # numResponses: 9 # numEntries: 8 David Sonenberg Systems / Network Administrator Stroz Friedberg, LLC 15 Maiden Lane, Suite 1208 New York, NY 10038 212.981.6527 (o) | 917.495.4918 (c) -----Original Message----- From: awilliam@whitemice.org [mailto:awilliam@whitemice.org] Sent: Thursday, December 30, 2004 9:47 AM To: David Sonenberg Cc: OpenLDAP-Software@OpenLDAP.org; samba@lists.samba.org Subject: Re: [Samba] Openldap + Samba 3 PDC> I'm trying to get Samba up but I can't seem to get the LDAP connection> working correctly. I can run a search from ldapsearch, but samba is > complaining that it can't connect.Can you actually do an ldapsearch? NOT ANONYMOUSLY but binding as the DN the DC will use?> Here's the error from log.smbd > [2004/12/29 16:04:04, 0] lib/smbldap.c:smbldap_connect_system(850) > failed to bind to server with dn= cn=Manager Error: Invalid > credentialsYour DCs bind DN is "cn=Manager"? It think you forgot to setup this part. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba