• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Samba + LDAP fehlermeldung

romses

Newbie
Hi,

ich habe ein Problem mit Samba, mein Samba Server hat ldap unterstützung, allerdings wenn ich ihn starten will meldet er einen Fehler, kommentiere ich die Zeilen in der smb.conf aus, die LDAP betreffen so klappt alles einwandfrei. Starte ich den Server mit LDAP Unterstützung so gibt es ein FAILED und in der log.smbd steht drin:


Code:
added interface ip=192.168.0.3 bcast=192.168.0.255 nmask=255.255.255.0
added interface ip=192.168.1.1 bcast=192.168.1.255 nmask=255.255.255.0
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=COJOBO))]
smbldap_open_connection: connection opened
init_sam_from_ldap: Entry found for user: root
init_services_keys: key lookup failed! (WERR_ACCESS_DENIED)
ERROR: failed to setup guest info.


Hat einer eine Idee wo das hacken an der Sache liegt?!


MfG
 

ThomasF

Hacker
Tja ...

Etwas mehr Info wäre nicht übel ...

Also min. die Einträge aus slapd.conf smb.conf

Außerdem macht mich folgendes stutzig :

kommentiere ich die Zeilen in der smb.conf aus, die LDAP betreffen so klappt alles einwandfrei

Gehe ich recht in der Annahme das du zuerst die "normale" Samba Version konfiguriert hast und dann "nur" mit den Einträgen in der smb.conf die LDAP Funktionalität hinzufügen wolltest ... oder nach welcher Anleitung bist du vorgegangen ???

So long

ThomasF
 
OP
R

romses

Newbie
Alles klar kommt sofort:

Dies ist die smb.conf
Code:
[global]
    workgroup = cojobo
    unix charset = LOCALE
    server string = Samba Server (Alexandria)
    #security = share

    #LOG
    log level = 2
    syslog = 1
    debug timestamp = no
    max log size = 100

    #drucker
    printing = CUPS
    printcap name = CUPS

    #Benutzerorientierte Anmeldung
    security = user
    encrypt passwords = yes

    #PDC
    local master = yes
    os level = 64
    domain master = yes
    domain logons = yes
    logon script = %u.bat
    logon path = \\%L\Profiles\%u
    logon home = \\%L\%u
    logon drive = H:
    nt acl support = no
    wins support = yes
    time server = yes
    admin users = root
    pam password change = yes

    #ldap
    #ldap passwd sync = yes
    #passdb backend = ldapsam:ldap://ldap-1.cojobo.net/
    #ldap admin dn = cn=root,dc=cojobo,dc=de
    #ldap suffix = dc=cojobo,dc=de
    #ldap group suffix = ou=users
    #ldap user suffix = ou=users
    #ldap machine suffix = ou=Computers
    #add machine script = /usr/sbin/smbldap-useradd -w "%u"
    #add user script = /usr/sbin/smbldap-useradd -m "%u"
    #ldap delete dn = Yes
    #add group script = /usr/sbin/smbldap-groupadd -p "%g"
    #delete group script = /usr/sbin/smbldap-groupdel "%g"
    #add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
    #delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
    #set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"

[homes]
    comment = Home-Verzeichnisse
    read only = no
    create mode = 0700
    writeable = yes

[Video]
    comment = Video (SERVER)
    path = /mnt/videoserver
    read only = yes
    guest ok = yes
    #writeable = yes

[Drucker]
    comment = Alle Drucker
    printable = yes
    path = /var/tmp
    create mask = 0600
    browsable = no

[netlogon]
    comment = Netzwerk Login Service
    browsable = no
    path = /var/samba/share/netlogon
    writeable = no

[Profiles]
    comment = Benutzerprofile
    path = /var/samba/share/profiles
    create mask = 0600
    directory mask = 0700
    browseable = no
    writeable = yes

[vscan]
    comment = Virusshutzfunktion
    path = /tmp
    vfs object = vscan-clamav
    vscan-clamav: config-file = /etc/samba/vscan-clamav.conf
    writeable = yes
    browseable = yes
    guest ok = yes

Hier noch die sldap.conf
Code:
# Allow LDAPv2 binds
allow bind_v2
# Loading of backend modules - automatically generated

modulepath      /usr/lib/ldap
moduleload back_bdb

# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/cojobo.schema
include         /etc/ldap/schema/od.schema
include         /etc/ldap/schema/samba.schema

# Schema check allows for forcing entries to
# match schemas for their objectClasses's
schemacheck off

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

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

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

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

sizelimit       -1

cachesize   10000
dbcacesize  1000000
threads     32

#######################################################################
# ldbm database definitions
#######################################################################
# The backend type, ldbm, is the default standard
database bdb

# The base of your directory
suffix          "dc=cojobo,dc=de"

# Where the database file are physically stored
directory       "/var/lib/ldap"

# Indexing options
index default pres,eq
index objectClass,uid,uidnumber,gidnumber,maildrop,mail,gecos,mailacceptinggeneralid,loginshell,homedirectory,byear,expiredate
index cn eq,sub

#index default pres,eq
#index uid pres,eq
#index cn eq,sub
#index maildrop,uidnumber,gidnumber pres,eq
#index objectClass eq

# Save the time that the entry gets modified
lastmod on

# 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
access to attrs=userPassword by dn.regex="cn=root,dc=cojobo,dc=de" write by dn.regex="cn=admin,dc=cojobo,dc=de" write by anonymous auth by self write by * none

# The admin dn has full write access
access to * by dn.regex="cn=root,dc=cojobo,dc=de" write by dn.regex="cn=admin,dc=cojobo,dc=de" write by * read

Ich hoffe das hilft nun mehr.
 

ThomasF

Hacker
Hmm, ... cojobo ... kommt mir bekannt vor ;)

Wie auch immer du solltest IMHO auch "ldap ssl = no" setzten und "ldap delete dn = Yes " auskommentiert lassen ...

Dafür den Loglevel in der slapd.conf hochsetzten (255 oder 256) ...

Und die ACLs auskommentieren bis du sicher bist das der Rest funktioniert ...

Nach welcher Anleitung bist du denn jetzt vor gegangen ?

Schau dir vielleicht dieses mal an -> http://www.kania-online.de/workshop.htm

Dort ist auch die Samba Anbindung mit drin, wenn ich mich recht erinnere ...

Apropos hast du smbpasswd -w PASSWORD ausgeführt ???

So long

ThomasF
 
Oben