Am Fri, 13 Dec 2019 11:15:48 -0500
schrieb Mark Murawski <markm-lists(a)intellasoft.net>:
Apologies ahead of time for the self-reply, but I'm hoping for
even a
tiny shred of information about getting this to work... in return I'm
more than willing to contribute patches to improve slapd-back-sql...
I just need a starting point where attributes actually work. Any
help would be greatly appreciated.
Thanks!
On 2019-11-22 16:55, Mark Murawski wrote:
> Hi!
>
> Attachments:
>
www.kobaz.net/misc/slapd.zip
>
www.kobaz.net/misc/ldap.sql
>
www.kobaz.net/misc/attributes.png
>
> Disclaimer: Let me first start out saying that this isn't my first
> run around the block. I understand that this is experimental and I
> accept the risks and issues that might come with back-sql.
>
> I started with the backend examples located in:
> servers/slapd/back-sql/rdbms_depend/pgsql
> ... and then started adding support for things like
> organizationUnit that are not included in the test db
>
> Attached is my ldap postgres database.
> Attached is my ldap /etc/ldap/slapd
>
> I'm aware that passwords/etc are in there, but it's not a big deal.
> It's just testing stuff on an internal system.
>
> The issue I'm having:
> - Attributes are not coming back when requesting ldap information
> or doing ldap search (Screenshot)
>
> Also noted is that the sample inetOrgPerson entries do not show any
> attributes like surname, despite them being stored in the postgres
> database in what looks like the correct format (exactly the same as
> the test db import)
>
>
> -- The organizationUnit has been added like this:
>
> 1-users-ou.ldif
> -----
> dn: ou=users,dc=directory, dc=pbx, dc=local
> ou: users
> description: holds users of the directory
> objectClass: organizationalUnit
> -----
> ldapadd -x -D "cn=admin,dc=directory, dc=pbx, dc=local" -w 'asdf'
> -v -f 1-users-ou.ldif
>
>
> Despite having specified 'description', this has not been added to
> the database as shown in the export. The organizational_unit table
> looks like this:
> id | ou | description
> ----+----+-------------
> 1 | |
>
> Looking at the postgres query logs, slapd has made no attempt
> whatsoever to set the description field, despite this field being
> mapped in the attributes as shown in the export. Also here for
> quick reference: Table: ldap_attr_mappings
> -[ RECORD 16 ]+
> id | 20
> oc_map_id | 5
> name | description
> sel_expr | organizational_unit.description
> sel_expr_u |
> from_tbls | organizational_unit
> join_where |
> add_proc | UPDATE organizational_unit SET description=? WHERE
> id=? delete_proc | SELECT 1 FROM organizational_unit WHERE ou = ?
> AND ID=? param_order | 3
> expect_return | 0
>
>
> Can someone shed some light on what's wrong here?
I am missing the odbinst.ini and odbc.ini files. Did you include
unixodbc module in /etc/unixodbc?
-Dieter
--
Dieter Klünter | Systemberatung
http://sys4.de
GPG Key ID: E9ED159B
53°37'09,95"N
10°08'02,42"E