[Date Prev][Date Next] [Chronological] [Thread] [Top]

Using postgresql with slapd?



Hi, I'll try this again. 

I am trying to set slapd to use postgres as the backend.

I have followed the steps in this howto:
http://www.samse.fr/GPL/ldap_pg/HOWTO/

I addition I had to do export ODBCINI=/etc/odbc.ini

When I start slapd syslog reads: (A lot first then)
backsql_open_db_conn: SQLConnect() to database 'PgSQL' as user 'xxxx'
failed:
Return code: -1
Native error code: 201
SQL engine state: IM002
Message: Missing server name, port, or database name in call to
CC_connect.

The odbc driver is loaded, but it fails to get the definitions from the
file. Has anyone set this up. I'll attach my files. I am pleading you to
help me.. HELP!
;
;  odbc.ini
;
[ODBC Data Sources]
PgSQL=PostgreSQL

[PgSQL]
Driver=/usr/lib/postgresql/lib/psqlodbc.so
Setup=/usr/lib/odbc/libodbcpsqlS.so
Description="Connection to LDAP/POSTGRESQL"
Servername=quigon
Database=pg_ldap
Port=5432
Username=test
Password=test
Protocol=6.4
FetchBufferSize=99
ReadOnly=no
Debug=1
CommLog=1

#[Default]
#Driver=/usr/lib/postgresql/lib/psqlodbc.so

#[ODBC]
#InstallDir=/usr/lib/odbc/lib
# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.

#######################################################################
# Global Directives:

# Features to permit
# Old allow comment: bind_v2
#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

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

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

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

# The base of your directory in database #1
#suffix         "o=sql,c=RU"
#rootdn         "cn=root,o=sql,c=RU"
suffix          "dc=digidix,dc=com"
rootdn		"cn=root,dc=digidix,dc=com"
rootpw		secret
dbname		PgSQL
dbuser		test
dbpasswd	test
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	"?||?"
has_ldapinfo_dn_ru	no

lastmod off