ldap- Zugriff auf ogo - contacts

Andreas Keller <[email protected]> Thu, 12 Apr 2007 15:14:16 +0200
Newsgroups gmane.comp.cms.opengroupware.user.german
Message-ID <[email protected]>
Salve,

ich komme nicht weiter bei dem Versuch, mittels LDAP auf die
ogo-Kontaktdaten zuzugreifen. Szenario: LDAP-Authorisierung der ogo-user
funktioniert. Nach dem Einfügen der back-sql Infos in
etc/ldap/slapd.conf wid der erste User, der sich einlogged, über LDAP
authorisiert, dann stürzt slapd ab.
Auf die Fehlermeldung 'client encoding mismatch' habe ich mit 'createdb
ogo -E LATIN1' und 'alter user ogo SET client_encoding to
LATIN1;'reagiert - ohne Erfolg. Wer kann helfen?

Ich habe bisher erfolgreich ogo, ldap, postgresql 8.1, cyrus und postfix
installiert, und fast alles funktioniert miteinander, bis auf z.B.
dieses Problem.

Mfg Andreas Keller
__
Pfarrei St. Pirmin und St. Michael
Pfarrer Andreas Keller	www.andreaskeller.com



Versionen, Konfiguration und Fehlermeldung 

Debian Sarge
ogo releases/opengroupware-1.1.6-yummy, releases/sope-4.5.9-maple
slapd 2.2.23
postgresql 8.1 (sarge-backports)
------------------
Konfigurationen:


#/etc/odbc.ini
[ogo]
Driver= /usr/lib/odbc/psqlodbc.so
Setup= /usr/lib/odbc/libodbcpsqlS.so
Description=The OpenGroupware Database
Servername=localhost
Port=5432
Protocol=7.4
FetchBufferSize=99
Username=ogo
Password=ogo.751
Database=ogo
ReadOnly=no
RowVersioning       = No
ShowSystemTables    = No
ShowOidColumn       = No
FakeOidIndex        = No
ConnSettings        =



#/etc/ldap/slapd.conf
# 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/opengroupware.schema
include         /etc/ldap/schema/evolutionperson.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        0

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

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

#######################################################################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend         bdb
checkpoint 512 30
##################################################
#   OGo Database back-sql
#   MUST be BEFORE your bdb or ldbm "regular" ldap database
database        sql
subordinate
suffix          "ou=Contacts,ou=OpenGroupware,dc=melx,dc=org"
dbname  ogo
dbuser  ogo
# I tried before: dbpasswd secred
dbpasswd {MD5}sDW/lm3fMYVbG6YbPqlX0Q==
lastmod off
#   new to OpenLDAP v2.1.x
has_ldapinfo_dn_ru      no
#   PostgreSQL
insentry_query  "insert into ldap_entries
(id,dn,oc_map_id,parent,keyval) values ((select max(id)+1 from
ldap_entries),?,?,?,?)"
upper_func      "upper"
strcast_func    "text"
concat_pattern  "?||?"


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

# The base of your directory in database #1
suffix          "dc=melx,dc=org"
rootdn          "cn=admin,dc=melx,dc=org"
rootpw          "{MD5}NnIytZaPyz/kUGvno4kxUg=="
                                        # Das Password wird mit
slappasswd -h {MD5} angelegt


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

# Indexing options for database #1
index           objectClass 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=melx,dc=org" 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=melx,dc=org" 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=melx,dc=org" write
#        by dnattr=owner write

#######################################################################
# 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



#Fehlermeldung (slapd -d 16383):

...
...
<==backsql_srch_query() returns SELECT DISTINCT
ldap_entries.id,ldap_static_entries.id,text('organizationalUnit') AS
objectClass,ldap_entries.dn AS dn FROM ldap_entries,ldap_static_entries
WHERE ldap_static_entries.id=ldap_entries.keyval AND
ldap_entries.oc_map_id=? AND upper(ldap_entries.dn) LIKE ? AND 1=1
Constructed query: SELECT DISTINCT
ldap_entries.id,ldap_static_entries.id,text('organizationalUnit') AS
objectClass,ldap_entries.dn AS dn FROM ldap_entries,ldap_static_entries
WHERE ldap_static_entries.id=ldap_entries.keyval AND
ldap_entries.oc_map_id=? AND upper(ldap_entries.dn) LIKE ? AND 1=1
id: '4'
(sub)dn: "%"
<==backsql_oc_get_candidates(): 0
send_ldap_result: conn=2 op=1 p=3
send_ldap_result: err=0 matched="" text=""
<==backsql_search()
send_ldap_result: conn=2 op=1 p=3
send_ldap_result: err=0 matched="" text=""
send_ldap_response: msgid=2 tag=101 err=0
ber_flush: 14 bytes to sd 10
  0000:  30 0c 02 01 02 65 07 0a  01 00 04 00 04 00
0....e........
ldap_write: want=14, written=14
  0000:  30 0c 02 01 02 65 07 0a  01 00 04 00 04 00
0....e........
conn=2 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
daemon: activity on 2 descriptors
daemon: new connection on 13
conn=3 fd=13 ACCEPT from IP=127.0.0.1:34791 (IP=0.0.0.0:389)
daemon: added 13r
daemon: activity on: 10r
daemon: read activity on 10
connection_get(10)
connection_get(10): got connid=2
connection_read(10): checking for input on id=2
slapd: /home/torsten/packages/openldap/openldap2.2-2.2.23/libraries/liblber/io.c:485: ber_get_next: Assertion `((ber)->ber_opts.lbo_valid==0x2)' failed.
Abgebrochen

---------------------------------------