Click to See Complete Forum and Search --> : LDAP conf


sanw2k
03-14-2003, 08:31 AM
Hi all!

Greetings to you!

While trying to configure OpenLdap in Redhat Linux 8.0 with postgresql i am getting the following error

[root@san]# /usr/bin/odbctest
odbctest: cannot connect to X server

/usr/lib/libpsqlodbc.so

if i am running ldapsearch i am getting the following error

ldap_bing: Can't contact LDAP server (81)

My configuration is as follows

openldap 2.1.15
Postgresql 7.2.2-1 with Postgresql-odbc 7.2.2-1
unixODBC-2.2.2-3

/usr/local/etc/openldap/slapd.conf

################################################## #####################
include /usr/local/etc/openldap/schema/core.schema

# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org

pidfile /usr/local/var/slapd.pid
argsfile /usr/local/var/slapd.args

database sql
suffix "dc=unisoft,dc=net"
rootdn "cn=Manager,dc=unisoft,dc=net"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw test
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory /usr/local/var/openldap-data
# Indices to maintain
index objectClass eq

my /usr/local/etc/openldap/ldap.conf

BASE dc=unisoft, dc=net
#URI ldap://ldap.example.com ldap://ldap-master.example.com:666
HOST ldap://10.0.3.8

/etc/odbc.ini

;
;odbc.ini
;
[ODBC Data Sources]
PgSQL=PostgreSQL

[PgSQL]
Driver=/usr/lib/libodbcpsql.so
;Driver=/usr/local/lib/psqlodbc.so
Description=Connection to LDAP/POSTGRESQL
Servername=localhost
Port=5432
Protocol=6.4
FetchBufferSize=99
Username=test
Password=test
Database=pg_ldap
ReadOnly=no
Debug=1
CommLog=1

[ODBC]
InstallDir=/usr/local/lib


/etc/odbcinst.ini

# Example driver definitinions
#
#

# Included in the unixODBC package
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1


# From the MyODBC package
#[MySQL]
#Description = ODBC for MySQL
#Driver = /usr/lib/libmyodbc.so
#FileUsage = 1

/etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 san localhost.localdomain localhost
10.0.3.8 san unisoft.net

/etc/pam.d/login

#%PAM-1.0
auth required /lib/security/pam_securetty.so
auth required /lib/security/pam_stack.so service=system-auth
auth required /lib/security/pam_nologin.so
account required /lib/security/pam_stack.so service=system-auth
password required /lib/security/pam_stack.so service=system-auth
session required /lib/security/pam_stack.so service=system-auth
session optional /lib/security/pam_console.so

/etc/pam.d/sshd

#%PAM-1.0
auth required /lib/security/pam_stack.so service=system-auth
auth required /lib/security/pam_nologin.so
account required /lib/security/pam_stack.so service=system-auth
password required /lib/security/pam_stack.so service=system-auth
session required /lib/security/pam_stack.so service=system-auth
session required /lib/security/pam_limits.so
session optional /lib/security/pam_console.so

postgresql server is running

and i have created few user names in that

with separate tables as instructed in

http://www.samse.fr/GPL/ldap_pg/HOWTO/x37.html


Can any one help me in this issue!

Regds
san

mdwatts
03-14-2003, 03:03 PM
Originally posted by sanw2k

[root@san]# /usr/bin/odbctest
odbctest: cannot connect to X server


Are you doing this while booted into runlevel 3 (text mode) or within X (runlevel 5)?

sanw2k
03-14-2003, 11:26 PM
Thanx mdwatts!

I doing this after booting in X

mdwatts
03-15-2003, 12:02 PM
Openldap/sql/odbc are subjects I really don't know that much about.

I'll just take a guess... Since you have defined 'Servername=localhost' and the error message is 'cannot connect to X server', try

xhost +localhost

sanw2k
03-17-2003, 06:46 AM
Dear Mdwatts

How it is related with X Server or xhost

Now i have installed fresh Redhat linux without X window

even then i am getting it

where it is going wrong