PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Problem mit Samba 3 und LDAP



Nase007
03.05.06, 14:37
Hallo,

ich habe ein kleines Problem beim aufsetzen eines LDAP Servers. Hierbei bin ich nach der Anleitung

http://wonzworld.de/wiki/doku.php?id=samba-ldap

vorgegangen.

Die config-Dateien habe ich so eins-zu-eins übernommen. Lediglich die Domäne habe ich überall angepasst.

Problem ist jetzt wenn ich den Befehl


/etc/init.d/sldap force-reload

ausführe, startet der Dienst nicht mit der Meldung:


Starting OpenLDAP: slapd - failed.
The operation failed but no output was produced. For hints on what went
wrong please refer to the system's logfiles (e.g. /var/log/syslog) or
try running the daemon in Debug mode like via "slapd -d 16383" (warning:
this will create copious output).

Im Syslog taucht dann folgendes auf:


May 3 12:28:16 localhost slapd[5123]: @(#) $OpenLDAP: slapd 2.2.26 (Oct 31 2005 09:10:53) $ ^I@pulsar:/home/torsten/packages/openldap/openldap2.2-2.2.26/debian/build/servers/slapd
May 3 12:28:16 localhost slapd[5123]: daemon: bind(6) failed errno=98 (Address already in use)
May 3 12:28:16 localhost slapd[5123]: daemon: IPv6 socket() failed errno=97 (Address family not supported by protocol)
May 3 12:28:16 localhost slapd[5123]: slapd stopped.
May 3 12:28:16 localhost slapd[5123]: connections_destroy: nothing to destroy.

Ich hoffe jemand kann mir helfen und die Infos reichen auch aus.

Danke & Gruß
Lumpy

bla!zilla
03.05.06, 14:43
Laut Log läuft bei dir bereits ein OpenLDAP Server. Auf jeden Fall hockt da was auf Port 389/tcp. Poste doch mal bitte die Ausgabe von "ps ax".

Nase007
03.05.06, 14:46
Ja das ist doch eigentlich richtig, dass der Dienst schon auf dem Port läuft, ich will ja auch einfach nur die Config neu einlesen oder habe ich das schon grundsätzlich falsch verstanden?

Hier mal die Ausgabe von ps ax


1 ? S 0:00 init [2]
2 ? S 0:00 [keventd]
3 ? SN 0:00 [ksoftirqd_CPU0]
4 ? S 0:00 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
99 ? S 0:04 [kjournald]
523 ? S 0:00 [khubd]
739 ? Ss 0:00 /sbin/syslogd
742 ? Ss 0:00 /sbin/klogd
812 tty2 Ss+ 0:00 /sbin/getty 38400 tty2
813 tty3 Ss+ 0:00 /sbin/getty 38400 tty3
814 tty4 Ss+ 0:00 /sbin/getty 38400 tty4
815 tty5 Ss+ 0:00 /sbin/getty 38400 tty5
816 tty6 Ss+ 0:00 /sbin/getty 38400 tty6
2538 ? Ss 0:00 /usr/sbin/lpd -s
3625 ? Ss 0:00 /usr/sbin/cron
3641 ? Ss 0:00 /usr/sbin/sshd
4000 ? Ss 0:00 /usr/sbin/slapd
4001 ? S 0:00 /usr/sbin/slapd
4002 ? S 0:00 /usr/sbin/slapd
4960 ? Ss 0:00 /usr/sbin/apache2 -k start -DSSL
4964 ? S 0:00 /usr/sbin/apache2 -k start -DSSL
4965 ? S 0:00 /usr/sbin/apache2 -k start -DSSL
4966 ? S 0:00 /usr/sbin/apache2 -k start -DSSL
4967 ? S 0:00 /usr/sbin/apache2 -k start -DSSL
4968 ? S 0:00 /usr/sbin/apache2 -k start -DSSL
5005 ? S 0:00 /usr/sbin/slapd
5083 ? Ss 0:00 /usr/sbin/nmbd -D
5085 ? Ss 0:00 /usr/sbin/smbd -D
5094 ? S 0:00 /usr/sbin/smbd -D
7286 ? Ss 0:00 /usr/sbin/inetd
7434 ? Ss 0:00 /usr/sbin/exim4 -bd -q30m
7464 ? Ss 0:00 /usr/sbin/atd
7584 ? Ss 0:00 /sbin/portmap
7637 ? Ss 0:00 /sbin/rpc.statd
7784 tty1 Ss+ 0:00 /sbin/getty 38400 tty1
7844 ? Ss 0:00 sshd: root@pts/0
7846 ? S 0:00 sshd: root@pts/0
7848 pts/0 Ss 0:00 -bash
7852 pts/0 R+ 0:00 ps ax


Gruß
Nase

bla!zilla
03.05.06, 15:04
4000 ? Ss 0:00 /usr/sbin/slapd
4001 ? S 0:00 /usr/sbin/slapd
4002 ? S 0:00 /usr/sbin/slapd


Da is der Übeltäter. Da läuft bereits ein slapd. Versuch mal



killall slapd


und danach ein beherztes



/etc/init.d/sldap start

Nase007
03.05.06, 15:11
Hey danke, das hat geklappt. Allerdings tritt jetzt direkt das nächste Problem auf. ;)

Wenn ich


smbldap-populate

ausführe bekomme ich die unten aufgeführten Fehlermeldungen.



Populating LDAP directory for domain LINWEB (S-1-5-21-210541360-3830809455-2980507039)
(using builtin directory structure)

adding new entry: dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 2.
adding new entry: ou=Users,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 3.
adding new entry: ou=Groups,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 4.
adding new entry: ou=Computers,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 5.
adding new entry: ou=Idmap,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 6.
adding new entry: uid=root,ou=Users,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 7.
adding new entry: uid=nobody,ou=Users,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 8.
adding new entry: cn=Domain Admins,ou=Groups,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 9.
adding new entry: cn=Domain Users,ou=Groups,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 10.
adding new entry: cn=Domain Guests,ou=Groups,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 11.
adding new entry: cn=Domain Computers,ou=Groups,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 12.
adding new entry: cn=Administrators,ou=Groups,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 16.
adding new entry: cn=Account Operators,ou=Groups,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 18.
adding new entry: cn=Print Operators,ou=Groups,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 19.
adding new entry: cn=Backup Operators,ou=Groups,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 20.
adding new entry: cn=Replicators,ou=Groups,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 21.
adding new entry: sambaDomainName=foobar,dc=LINWEB,dc=local
failed to add entry: modifications require authentication at /usr/sbin/smbldap-populate line 495, <GEN1> line 21.

Please provide a password for the domain root:
No such object at /usr/share/perl5/smbldap_tools.pm line 353.


Jetzt stehe ich mal wieder auf dem Schlauch. :confused:

Gruß
Nase

PS: Danke für deine schnelle Antworten :)

bla!zilla
03.05.06, 15:14
Poste mal bitte einen Teil von deinem LDIF-File, bzw. von dem Teil in dem diese Passage "modifications require authentication at /usr/sbin/smbldap-populate" vorkommt.

Nase007
03.05.06, 15:19
Poste mal bitte einen Teil von deinem LDIF-File, bzw. von dem Teil in dem diese Passage "modifications require authentication at /usr/sbin/smbldap-populate" vorkommt.

Jetzt stehe ich noch mehr auf dem Schlauch. :(

Wie gesagt ich gehe stumpf nach dem Link

http://wonzworld.de/wiki/doku.php?id=samba-ldap

vor. Also ich habe nicht mehr oder weniger gemacht als du dort sehen kannst. Bei den config-Files habe ich lediglich die Domäne in linweb.local geändert. Ansonsten genau nach Anweisung. Also wenn du mir genau sagen kannst, welchen Teil du aus welcher Datei haben willst, dann poste ich den hier gerne.

Gruß
Nase

PS: Ich habe vorher noch nie einen LDAP Server aufgesetzt, also bitte keine Wunder von mir erwarten. :rolleyes:

EDIT: Ok, also ich bin jetzt schon weiter und weiß jetzt auch welche Datei du meinst :)

smbldap-dsa.ldif

dn: ou=DSA,dc=linweb,dc=local
objectClass: top
objectClass: organizationalUnit
ou: DSA
description: security accounts for LDAP clients

dn: cn=samba,ou=DSA,dc=linweb,dc=local
objectclass: organizationalRole
objectClass: top
objectClass: simpleSecurityObject
userPassword: sambasecretpwd
cn: samba

dn: cn=nssldap,ou=DSA,dc=linweb,dc=local
objectclass: organizationalRole
objectClass: top
objectClass: simpleSecurityObject
userPassword: nssldapsecretpwd
cn: nssldap

dn: cn=smbldap-tools,ou=DSA,dc=linweb,dc=local
objectclass: organizationalRole
objectClass: top
objectClass: simpleSecurityObject
userPassword: smbldapsecretpwd
cn: smbldap-tools

Wenn ich versuche diese Datei mit Befehl

ldapadd -x -h localhost -D "cn=Manager,dc=mydomain,dc=org" -f smbldap-dsa.ldif -W
zu importieren, dann kommt als Resultat das folgende

adding new entry "ou=DSA,dc=linweb,dc=local"
ldap_add: No such object (32)
additional info: parent does not exist


Ich hoffe diese Infos helfen weiter.

emba
06.05.06, 12:26
zu importieren, dann kommt als Resultat das folgende

Code:

adding new entry "ou=DSA,dc=linweb,dc=local"
ldap_add: No such object (32)
additional info: parent does not exist

Ich hoffe diese Infos helfen weiter.

du versuchst eine ou zu erzeugen unter einer wurzel, die nicht existiert
warum gehst du nicht mal hier nach
http://www.linuxforen.de/forums/showthread.php?t=174854

greez

neonknight
09.05.06, 08:36
Jetzt stehe ich mal wieder auf dem Schlauch. :confused:

Hast du unter /etc/smbldap-tools beide Dateien korrekt angepasst? Samba-LDAP-Passwort vergeben (smbpasswd -w)?