I have a serous problem.

I have for some time now tried to get an SAMBA based Domain Controller
working.
I have tried with OpenLDAP and tdbsam as backend, but I get the same
error every time.

I wood prefer to use LDAP as my backend.
I have read tons of how-to SAMBA + LDAP, but non of the seams to work
for my, is there someone that maybe can see what I have done rung in
my config.?

I have attached my samba conf and LDAP conf.

Samba is connected to OpenLDAP, and LDAP is running fine.
But when I try to join my Windows XP Pro SP3 I takes about one Min and
it tells my that Username and/or Password maybe rung, ore not existing.

There is no doubt that Samba and Ldap is talking together (samba have
updated the SID and RID's), cause when I try to join the domain LDAP
is activated, but the return value is somehow disappearing on the way
back to my client

I have some wireshark dump that I can provide if its necessary.
I can provide LOGS, DUMPS, and everything needed if its necessary.

System info:
Clean installed Debian Lenny (5.0.3)
Clean installed Samba 3.2.5 + Winbind 3.2.5
Clean installed OpenLDAP 2.4.11 (slapd)
Debian default smbldap-tools (smbldap-populate is working and have
populated LDAP without problems)
if there is something I have forgotten please just ask for it, I'm
close to be desperate.!

---
Med Venlig Hilsen / Best regards
Henrik Dige Semark

# Defining domain name, hostname
####################################################
[global]
        dns proxy = no
        netbios name = pdc
        wins support = Yes
        workgroup = semarktest
        include = /etc/samba/dhcp.conf
        server string = Debian Lenny (5.0.3) PDC
        name resolve order = host lmhosts bcast wins

# Netwok-settings
####################################################
        hosts deny = ALL
        hosts allow = 192.168.1.0/24 127.

# Specifying passwd backend database
####################################################
#        username map = /etc/samba/smbusers
#        smb passwd file = /etc/samba/smbpasswd
#        passdb backend = tdbsam:/etc/samba/userdatabase.tdb
        passdb backend = ldapsam:ldap://127.0.0.1

# LDAPSMB-CONFIG - SMBLDAP-TOOLS
####################################################
# LDAPSMB-CONFIG
#       add user script = /usr/sbin/ldapsmb -a -u "%u"
#       add machine script = /usr/sbin/ldapsmb -a -w "%u"
#       add group script = /usr/sbin/ldapsmb -a -g "%g"
#       add user to group script = /usr/sbin/ldapsmb -j -u "%u" -g "%g"
#       delete user script = /usr/sbin/ldapsmb -d -u "%u"
#       delete group script = /usr/sbin/ldapsmb -d -g "%g"
#       delete user from group script = /usr/sbin/ldapsmb -r -u "%u" -g "%g"
#       set primary group script = /usr/sbin/ldapsmb -m -u "%u" -g "%g"

# SMBLDAP-TOOLS
        add user script = /usr/sbin/smbldap-useradd -a -m "%u" -M "%u"
        add machine script = /usr/sbin/smbldap-useradd -w "%u"
        add group script = /usr/sbin/smbldap-groupadd -p "%g"
        add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
        delete user script = /usr/sbin/smbldap-userdel "%u"
        delete group script = /usr/sbin/smbldap-groupdel "%g"
        delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
        set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"

# TDBSAM
#       add user script = /usr/sbin/useradd -m %u 
#       delete user script = /usr/sbin/userdel -r %u 
#       add group script = /usr/sbin/groupadd %g  
#       delete group script = /usr/sbin/groupdel %g  
#       add user to group script = /usr/sbin/usermod -G %g %u 
#       add machine script = /usr/sbin/useradd -s /bin/false -d /dev/null  -g 
machines %u 


# Various other directives ( man smb.conf )
###################################################
        logon drive = H:
        logon home = \\%L\%U
#        logon path = \\%L\profile\%U
        logon script = scripts/logon.bat
        os level = 65
        time server = Yes
        domain master = Yes
        domain logons = Yes
        preferred master = Yes
        enable privileges = yes
        show add printer wizard = yes
        dont descend = /proc,/dev,/etc,/lib,/lost+found,/initrd

# Windbind
##################################################
        winbind separator = %
        winbind cache time = 10
        winbind enum users = Yes
        winbind uid = 1000-21000
        winbind gid = 1000-21000
        winbind enum groups = Yes
        template shell = /bin/bash
        template homedir = /home/%U
        winbind use default domain = Yes

# OpenLDAP stuff is defined here
###################################################
        ldap ssl = no
        ldap delete dn = Yes
        ldap passwd sync = Yes
        ldap user suffix = ou=Users
        ldap idmap suffix = ou=Users
        ldap group suffix = ou=Groups
        ldap machine suffix = ou=Computers
        ldap suffix = dc=semark-testing,dc=dk
        ldap admin dn = cn=admin,dc=semark-testing,dc=dk
        idmap uid = 1000-21000
        idmap gid = 1000-21000

# Defining logging facility
####################################################
        syslog = 10
        log level = 256
        log file = /var/log/samba/%m.log
        panic action = /usr/share/samba/panic-action %d

# Authentication
####################################################
        security = user
        encrypt passwords = true
        unix password sync = yes
        pam password change = yes
        obey pam restrictions = no
        
        # Removed for windows clients roaming pofile
        # invalid users = root

        # For unix passwd change - dosen't matter if running LDAP for UNIX auth
        # passwd program = /usr/bin/passwd %u
        # passwd chat = *Enter\snew\s*\spassword:* %n\n 
*Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        passwd program = /usr/sbin/smbldap-passwd %u
        passwd chat = *Nyt kodeord* \n *Det nye kodeord skal være minimum 6 
karaktere lange, og kan indeholde [0-9], [a-z] og [A-Z]* \n *Ny kode* %n\n 
*Tast koden igen* %n\n * Koden skiftet korrekt*

# Specifying printing subsystem
####################################################
        printing = cups
        load printers = Yes
        printcap name = cups

# Virus Scanning Definitions
####################################################
#       vfs object = vscan-clamav
#       vscan-clamav: config-file = /etc/samba/vscan-clamav.conf

# Misc
###################################################
        socket options = TCP_NODELAY

# SHARE
##################################################
[homes]
        comment = Home Directories
        read only = No
        browseable = Yes
        valid users = %U
        create mode = 0750
        create mask = 0750

# Defining printers
####################################################
[printers]
        comment = All Printers
        path = /var/spool/samba
        printer admin = @"Print Operators"
        public = Yes
        guest ok = Yes
        read only = Yes
        printable = Yes
        browseable = No

[print$]
        comment = Printer Drivers
        path = /etc/samba/drivers
        guest ok = No
        read only = Yes
        browseable = Yes
        create mask = 0664
        directory mask = 0775
        write list = @"Print Operators"
#        valid users = @"Print Operators"


# Defining network logon service
####################################################
[netlogon]
        comment = Network Logon Service
        path = /var/lib/samba/netlogon
        guest ok = Yes
        browseable = No
        write list = "@admins"

# Defining profile share ( for roaming profiles )
####################################################
[profiles]
        comment = Roaming Profiles
        path = /var/lib/samba/profiles
        create mask = 0664
        directory mask = 0755
        browseable = No
        guest ok = Yes
        force user = %U
        valid users = %U "Domain Admins"
        read only = No
        profile acls = Yes
        writeable = Yes

# Defining arbitary shared resource
####################################################
[share]
        comment = data share
        path = /opt/stuff
        valid users = %U

# Mnt
####################################################
#[mnt]
#        path = /mnt
#        guest ok = No
#        read only = No

# html
####################################################
[html]
        comment = www
        path = /home/%U/public
        valid users = %U
        writeable = Yes
        browseable = Yes
        guest ok = No
include         /etc/ldap/schema/core.schema
#include                /etc/ldap/schema/autofs.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/corba.schema
include         /etc/ldap/schema/dyngroup.schema
include         /etc/ldap/schema/java.schema
include         /etc/ldap/schema/misc.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/openldap.schema
include         /etc/ldap/schema/ppolicy.schema
include         /etc/ldap/schema/samba.schema
include         /etc/ldap/schema/collective.schema

# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.

#######################################################################
# Global Directives:

# Features to permit
#allow bind_v2

# Schema and objectClass definitions
include         /etc/ldap/schema.conf

# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid

# List of arguments that were passed to the server
argsfile        /var/run/slapd/slapd.args

# Read slapd.conf(5) for possible values
loglevel        5

# Where the dynamically loaded modules are stored
modulepath      /usr/lib/ldap
moduleload      back_hdb

# The maximum number of entries that is returned for a search operation
sizelimit 5000

# The tool-threads parameter sets the actual amount of cpu's that is used
# for indexing.
tool-threads 1

#######################################################################
# Specific Backend Directives for hdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend         hdb

#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend                <other>

#######################################################################
# Specific Directives for database #1, of type hdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database        hdb

# The base of your directory in database #1
suffix          "dc=semark-testing,dc=dk"

# rootdn directive for specifying a superuser on the database. This is needed
# for syncrepl.
rootdn          "cn=admin,dc=semark-testing,dc=dk"
rootpw          my-pass


# Where the database file are physically stored for database #1
directory       "/var/lib/ldap/semark-testing"

# The dbconfig settings are used to generate a DB_CONFIG file the first
# time slapd starts.  They do NOT override existing an existing DB_CONFIG
# file.  You should therefore change these settings in DB_CONFIG directly
# or remove DB_CONFIG and restart slapd for changes to take effect.

# For the Debian package we use 2MB as default but be sure to update this
# value if you have plenty of RAM
dbconfig set_cachesize 0 20097152 0

# Sven Hartge reported that he had to set this value incredibly high
# to get slapd running at all. See http://bugs.debian.org/303057 for more
# information.

# Number of objects that can be locked at the same time.
dbconfig set_lk_max_objects 1500
# Number of locks (both requested and granted)
dbconfig set_lk_max_locks 1500
# Number of lockers
dbconfig set_lk_max_lockers 1500

# Indexing options for database #1
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


# Save the time that the entry gets modified, for database #1
lastmod         on

# Checkpoint the BerkeleyDB database periodically in case of system
# failure and to speed slapd shutdown.
checkpoint      512 30

# Where to store the replica logs for database #1
# replogfile    /var/lib/ldap/replog

# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to database #1 only

access to attrs=userPassword,shadowLastChange
        by dn="cn=admin,dc=semark-testing,dc=dk" write
        by anonymous auth
        by self write
        by * none

# Ensure read access to the base for things like
# supportedSASLMechanisms.  Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work 
# happily.
access to dn.base="" by * read

# The admin dn has full write access, everyone else
# can read everything.
access to *
        by dn="cn=admin,dc=semark-testing,dc=dk" write
        by * read


# Tilføjet fjern evt.!
access to attrs=userPassword
        by self write
        by anonymous auth
        by * none

access to attrs=sambaLMPassword
        by self write
        by anonymous auth
        by * none

access to attrs=sambaNTPassword
        by self write
        by anonymous auth
        by * none

access to *
        by * read


# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
#access to dn=".*,ou=Roaming,o=morsnet"
#        by dn="cn=admin,dc=semark,dc=dk" write
#        by dnattr=owner write

#######################################################################
# Specific Directives for database #2, of type 'other' (can be hdb too):
# Database specific directives apply to this databasse until another
# 'database' directive occurs
#database        <other>

# The base of your directory for database #2
#suffix         "dc=debian,dc=org"
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to