Mysterious
30.04.07, 16:18
Hi, ich versuche hier gerade einen SAMBA PDC mit LDAP Backend nach der Anleitung von http://samba-ldap.de" aufzusetzen. KLappte eigentlich alles prima nach diessem Howto nur kann ich mich nicht mehr auf der Console anmelden seit die Authentifizierung über LDAP laufgen soll.
Meine auth.log meldet folgendes:
pam_ldap: error trying to bind (Invalid credentials)
Bei aktivem Logging gibt mir LDAP folgendes aus:
Apr 30 17:05:40 pdc slapd[2613]: daemon: select: listen=6 active_threads=0 tvp=N ULL
Apr 30 17:05:40 pdc slapd[2613]: do_bind
Apr 30 17:05:40 pdc slapd[2613]: >>> dnPrettyNormal: <cn=admin,dc=af-finanzoptim ierung,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: <<< dnPrettyNormal: <cn=admin,dc=af-finanzoptim ierung,dc=de>, <cn=admin,dc=meinedomain,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: do_bind: version=3 dn="cn=admin,dc=af-finanzopt imierung,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 BIND dn="cn=admin,dc=af-finanzoptim ierung,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: conn=0 op=0 p=3
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: err=49 matched="" text=""
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_response: msgid=1 tag=97 err=49
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 RESULT tag=97 err=49 text=
pdc:/usr/src/smbldap-tools-0.9.2# tail /var/log/syslog clear
==> /var/log/syslog <==
Apr 30 17:05:40 pdc slapd[2613]: daemon: select: listen=6 active_threads=0 tvp=NULL
Apr 30 17:05:40 pdc slapd[2613]: do_bind
Apr 30 17:05:40 pdc slapd[2613]: >>> dnPrettyNormal: <cn=admin,dc=meinedomain,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: <<< dnPrettyNormal: <cn=admin,dc=meinedomain,dc=de>, <cn=admin,dc=meinedomain,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: do_bind: version=3 dn="cn=admin,dc=meinedomain,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 BIND dn="cn=admin,dc=meinedomain,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: conn=0 op=0 p=3
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: err=49 matched="" text=""
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_response: msgid=1 tag=97 err=49
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 RESULT tag=97 err=49 text=
tail: ,,clear" kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden
pdc:/usr/src/smbldap-tools-0.9.2# clear
pdc:/usr/src/smbldap-tools-0.9.2# tail /var/log/syslog clear
==> /var/log/syslog <==
Apr 30 17:05:40 pdc slapd[2613]: daemon: select: listen=6 active_threads=0 tvp=NULL
Apr 30 17:05:40 pdc slapd[2613]: do_bind
Apr 30 17:05:40 pdc slapd[2613]: >>> dnPrettyNormal: <cn=admin,dc=meinedomain,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: <<< dnPrettyNormal: <cn=admin,dc=meinedomain,dc=de>, <cn=admin,dc=meinedomain,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: do_bind: version=3 dn="cn=admin,dc=meinedomain,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 BIND dn="cn=admin,dc=meinedomain,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: conn=0 op=0 p=3
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: err=49 matched="" text=""
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_response: msgid=1 tag=97 err=49
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 RESULT tag=97 err=49 text=
Meine smb-conf sieht folgendermasen aus:
[global]
dos charset = 850
unix charset = ISO-8859-15
display charset = ISO-8859-15
# Name der Domain
workgroup = SAMBA-LDAP
# Netbios Name auf den der Server zusätzlich hört
netbios name = PDC
# Dies wird bei den Freigaben angezeigt an welchen Server man sich Connecten möchte
server string = PDC
update encrypted = Yes
obey pam restrictions = Yes
# Passwort Backend
passdb backend = ldapsam:ldap://127.0.0.1/
pam password change = Yes
passwd chat debug = yes
# Loglevel und in welche Datei gelogt wird
# %m bedeutet das er eine Datei anlegt mit dem PC Namen bzw. IP Adresse von dem
# ein Connect stattgefunden hat
log level = 1
log file = /var/data/samba/logs/system/log.%m
# Samba soll auch als Zeitserver fungieren
time server = Yes
socket options = SO_KEEPALIVE IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
# Samba Tools zur Verwaltung der Benutzer, Gruppen und Computerkonten im LDAP
add user script = /usr/local/sbin/smbldap-useradd .m .a .%u.
delete user script = /usr/local/sbin/smbldap-userdel .%u.
add group script = /usr/local/sbin/smbldap-groupadd .p .%g.
delete group script = /usr/local/sbin/smbldap-groupdel .%g.
add user to group script = /usr/local/sbin/smbldap-groupmod .m .%u. .%g.
delete user from group script = /usr/local/sbin/smbldap-groupmod .x .%u..%g.
set primary group script = /usr/local/sbin/smbldap-usermod .g .%u. .%g.
add machine script = /usr/local/sbin/smbldap-useradd .w .%u.
# Datei die beim Login in der Domäne ausgeführt werden soll und wo sich
# die Profile der Benutzer sich befinden die beim Login geladen werden sollen
logon script = %U.cmd
logon path = \\%L\%U\profile
logon drive = Z:
logon home = \\%L\%U
# Server soll Domänen Logons durchführen und als Masterserver in der Netzwerk
# Umgebung fungieren
domain logons = Yes
os level = 255
preferred master = Yes
domain master = Yes
# LDAP werte für den Zugriff von Samba auf die LDAP Datenbank
ldap admin dn = cn=admin,dc=samba-ldap,dc=meinedomain,dc=de
ldap delete dn = Yes
ldap user suffix = ou=Users
ldap group suffix = ou=Groups
ldap machine suffix = ou=Machines
ldap passwd sync = Yes
ldap suffix = dc=samba-ldap,dc=local
ldap ssl = no
host msdfs = Yes
# Administratoren des Servers . alle Aktionen warden mit dem Systembenutzer root
# ausgeführt
admin users = root, Administrator
# Welche Netzwerke bzw. Hosts dürfen auf diesen Server zugreifen
hosts allow = 192.168.1.0/24
profile acls = Yes
logon drive = Z:
use sendfile = no
large readwrite = no
max xmit = 16644
# Freigabe für die Netlogon Scripte die beim Anmelden an der Domäne ausgeführt
# werden
[netlogon]
comment = Network Logon Service
path = /var/data/samba/share/netlogon/
write list = Administrator, root
browseable = No
read only = No
guest ok = Yes
# Freigabe Public für Dateien der Allgemeinheit im Netzwerk
[Public]
comment = Public
path = /var/data/samba/share/public
read only = No
# Persönliches Laufwerk der Benutzer, in diesem liegt auch das profile Verzeichniss
# dieses sollte vom Benuter nicht gelöscht werden!
[homes]
comment = Homedrive
path = /var/data/samba/share/home/%U
valid users = %S
read only = No
create mask = 0644
directory mask = 0775
browseable = No
# Ende
Meine LDAP Konfig schaut so aus:
# Allow LDAPv2 binds
allow bind_v2
# 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/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
include /etc/ldap/schema/samba.schema
# Schema check allows for forcing entries to
# match schemas for their objectClasses's
schemacheck on
# 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.args
# Read slapd.conf(5) for possible values
loglevel -1
# Where the dynamically loaded modules are stored
modulepath /usr/lib/ldap
moduleload back_ldbm
################################################## #####################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend ldbm
#checkpoint 512 30
################################################## #####################
# 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 bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database ldbm
# The base of your directory in database #1
suffix "dc=samba-ldap,dc=meinedomain,dc=de"
rootdn "cn=admin,dc=samba-ldap,dc=meinedomain,dc=de"
rootpw XXXXX
# Where the database file are physically stored for database #1
directory "/var/lib/ldap"
# Indexing options for database #1
#index objectClass eq
index objectClass,uidNumber,gidNumber eq
index cn,sn,uid,displayName pres,sub,eq
index memberUid,mail,givenname eq,subinitial
index sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
# Save the time that the entry gets modified, for database #1
lastmod on
# 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
# by dn="cn=admin,dc=samba-ldap,dc=meinedomain,dc=de" 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=samba-ldap,dc=meinedomain,dc=de" write
# 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=samba-ldap,dc=meinedomain,dc=de" write
# by dnattr=owner write
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
################################################## #####################
# Specific Directives for database #2, of type 'other' (can be bdb 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"
Würde mich freuen wenn mir jemand weiterhelfen könnte mit diesen Problemchen.
Gruß Mysterious
Meine auth.log meldet folgendes:
pam_ldap: error trying to bind (Invalid credentials)
Bei aktivem Logging gibt mir LDAP folgendes aus:
Apr 30 17:05:40 pdc slapd[2613]: daemon: select: listen=6 active_threads=0 tvp=N ULL
Apr 30 17:05:40 pdc slapd[2613]: do_bind
Apr 30 17:05:40 pdc slapd[2613]: >>> dnPrettyNormal: <cn=admin,dc=af-finanzoptim ierung,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: <<< dnPrettyNormal: <cn=admin,dc=af-finanzoptim ierung,dc=de>, <cn=admin,dc=meinedomain,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: do_bind: version=3 dn="cn=admin,dc=af-finanzopt imierung,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 BIND dn="cn=admin,dc=af-finanzoptim ierung,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: conn=0 op=0 p=3
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: err=49 matched="" text=""
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_response: msgid=1 tag=97 err=49
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 RESULT tag=97 err=49 text=
pdc:/usr/src/smbldap-tools-0.9.2# tail /var/log/syslog clear
==> /var/log/syslog <==
Apr 30 17:05:40 pdc slapd[2613]: daemon: select: listen=6 active_threads=0 tvp=NULL
Apr 30 17:05:40 pdc slapd[2613]: do_bind
Apr 30 17:05:40 pdc slapd[2613]: >>> dnPrettyNormal: <cn=admin,dc=meinedomain,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: <<< dnPrettyNormal: <cn=admin,dc=meinedomain,dc=de>, <cn=admin,dc=meinedomain,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: do_bind: version=3 dn="cn=admin,dc=meinedomain,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 BIND dn="cn=admin,dc=meinedomain,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: conn=0 op=0 p=3
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: err=49 matched="" text=""
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_response: msgid=1 tag=97 err=49
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 RESULT tag=97 err=49 text=
tail: ,,clear" kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden
pdc:/usr/src/smbldap-tools-0.9.2# clear
pdc:/usr/src/smbldap-tools-0.9.2# tail /var/log/syslog clear
==> /var/log/syslog <==
Apr 30 17:05:40 pdc slapd[2613]: daemon: select: listen=6 active_threads=0 tvp=NULL
Apr 30 17:05:40 pdc slapd[2613]: do_bind
Apr 30 17:05:40 pdc slapd[2613]: >>> dnPrettyNormal: <cn=admin,dc=meinedomain,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: <<< dnPrettyNormal: <cn=admin,dc=meinedomain,dc=de>, <cn=admin,dc=meinedomain,dc=de>
Apr 30 17:05:40 pdc slapd[2613]: do_bind: version=3 dn="cn=admin,dc=meinedomain,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 BIND dn="cn=admin,dc=meinedomain,dc=de" method=128
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: conn=0 op=0 p=3
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_result: err=49 matched="" text=""
Apr 30 17:05:40 pdc slapd[2613]: send_ldap_response: msgid=1 tag=97 err=49
Apr 30 17:05:40 pdc slapd[2613]: conn=0 op=0 RESULT tag=97 err=49 text=
Meine smb-conf sieht folgendermasen aus:
[global]
dos charset = 850
unix charset = ISO-8859-15
display charset = ISO-8859-15
# Name der Domain
workgroup = SAMBA-LDAP
# Netbios Name auf den der Server zusätzlich hört
netbios name = PDC
# Dies wird bei den Freigaben angezeigt an welchen Server man sich Connecten möchte
server string = PDC
update encrypted = Yes
obey pam restrictions = Yes
# Passwort Backend
passdb backend = ldapsam:ldap://127.0.0.1/
pam password change = Yes
passwd chat debug = yes
# Loglevel und in welche Datei gelogt wird
# %m bedeutet das er eine Datei anlegt mit dem PC Namen bzw. IP Adresse von dem
# ein Connect stattgefunden hat
log level = 1
log file = /var/data/samba/logs/system/log.%m
# Samba soll auch als Zeitserver fungieren
time server = Yes
socket options = SO_KEEPALIVE IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
# Samba Tools zur Verwaltung der Benutzer, Gruppen und Computerkonten im LDAP
add user script = /usr/local/sbin/smbldap-useradd .m .a .%u.
delete user script = /usr/local/sbin/smbldap-userdel .%u.
add group script = /usr/local/sbin/smbldap-groupadd .p .%g.
delete group script = /usr/local/sbin/smbldap-groupdel .%g.
add user to group script = /usr/local/sbin/smbldap-groupmod .m .%u. .%g.
delete user from group script = /usr/local/sbin/smbldap-groupmod .x .%u..%g.
set primary group script = /usr/local/sbin/smbldap-usermod .g .%u. .%g.
add machine script = /usr/local/sbin/smbldap-useradd .w .%u.
# Datei die beim Login in der Domäne ausgeführt werden soll und wo sich
# die Profile der Benutzer sich befinden die beim Login geladen werden sollen
logon script = %U.cmd
logon path = \\%L\%U\profile
logon drive = Z:
logon home = \\%L\%U
# Server soll Domänen Logons durchführen und als Masterserver in der Netzwerk
# Umgebung fungieren
domain logons = Yes
os level = 255
preferred master = Yes
domain master = Yes
# LDAP werte für den Zugriff von Samba auf die LDAP Datenbank
ldap admin dn = cn=admin,dc=samba-ldap,dc=meinedomain,dc=de
ldap delete dn = Yes
ldap user suffix = ou=Users
ldap group suffix = ou=Groups
ldap machine suffix = ou=Machines
ldap passwd sync = Yes
ldap suffix = dc=samba-ldap,dc=local
ldap ssl = no
host msdfs = Yes
# Administratoren des Servers . alle Aktionen warden mit dem Systembenutzer root
# ausgeführt
admin users = root, Administrator
# Welche Netzwerke bzw. Hosts dürfen auf diesen Server zugreifen
hosts allow = 192.168.1.0/24
profile acls = Yes
logon drive = Z:
use sendfile = no
large readwrite = no
max xmit = 16644
# Freigabe für die Netlogon Scripte die beim Anmelden an der Domäne ausgeführt
# werden
[netlogon]
comment = Network Logon Service
path = /var/data/samba/share/netlogon/
write list = Administrator, root
browseable = No
read only = No
guest ok = Yes
# Freigabe Public für Dateien der Allgemeinheit im Netzwerk
[Public]
comment = Public
path = /var/data/samba/share/public
read only = No
# Persönliches Laufwerk der Benutzer, in diesem liegt auch das profile Verzeichniss
# dieses sollte vom Benuter nicht gelöscht werden!
[homes]
comment = Homedrive
path = /var/data/samba/share/home/%U
valid users = %S
read only = No
create mask = 0644
directory mask = 0775
browseable = No
# Ende
Meine LDAP Konfig schaut so aus:
# Allow LDAPv2 binds
allow bind_v2
# 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/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
include /etc/ldap/schema/samba.schema
# Schema check allows for forcing entries to
# match schemas for their objectClasses's
schemacheck on
# 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.args
# Read slapd.conf(5) for possible values
loglevel -1
# Where the dynamically loaded modules are stored
modulepath /usr/lib/ldap
moduleload back_ldbm
################################################## #####################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend ldbm
#checkpoint 512 30
################################################## #####################
# 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 bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database ldbm
# The base of your directory in database #1
suffix "dc=samba-ldap,dc=meinedomain,dc=de"
rootdn "cn=admin,dc=samba-ldap,dc=meinedomain,dc=de"
rootpw XXXXX
# Where the database file are physically stored for database #1
directory "/var/lib/ldap"
# Indexing options for database #1
#index objectClass eq
index objectClass,uidNumber,gidNumber eq
index cn,sn,uid,displayName pres,sub,eq
index memberUid,mail,givenname eq,subinitial
index sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
# Save the time that the entry gets modified, for database #1
lastmod on
# 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
# by dn="cn=admin,dc=samba-ldap,dc=meinedomain,dc=de" 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=samba-ldap,dc=meinedomain,dc=de" write
# 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=samba-ldap,dc=meinedomain,dc=de" write
# by dnattr=owner write
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
################################################## #####################
# Specific Directives for database #2, of type 'other' (can be bdb 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"
Würde mich freuen wenn mir jemand weiterhelfen könnte mit diesen Problemchen.
Gruß Mysterious