Listing 1


# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.7 
# 2001/09/27 20:00:31 kurt Exp $
##
# See slapd.conf(5) for details on configuration options
# This file should NOT be world readable.
#
include schema/core.schema

# Define global ACLs to disable default read access.

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

pidfile %LOCALSTATEDIR%/slapd.pid
argsfile %LOCALSTATEDIR%/slapd.args

# Load dynamic backend modules:
# modulepath %MODULEDIR%
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la

#######################################################
# ldbm database definitions
#######################################################

database ldbm
suffix "o=myorg,c=US"
rootdn "cn=Manager,o=myorg,c=US"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for
# details. Use of strong authentication encouraged.
rootpw secret

# The database directory MUST exist prior to running
# slapd AND should only be accessible by the slapd/tools.
directory openldap-ldbm

# Indices to maintain
index objectClass eq



Listing 2


dn: o=myorg, c=US
o: myorg
objectclass: organization
objectclass: top
description: Bhitcon
postalAddress: SomeStreet 123, Somewhere
telephoneNumber: +43 69919202419

dn: ou=developer, o=myorg, c=US
ou: developer
objectclass: organizationalUnit
telephonenumber: +431 69919202419
description: Bhitcon Developers

dn: uid=betha, ou=developer, o=myorg, c=US
uid: betha
objectclass: simpleSecurityObject
userPassword: betha1
objectclass: uidObject
objectclass: person
cn: Bettina Kriebernegg
sn: Kriebernegg
description: PB Developer

dn: uid=berham, ou=developer, o=myorg, c=US
uid: berham
objectclass: simpleSecurityObject
userPassword: ham1
objectclass: uidObject
objectclass: person
cn: Berndt Hamboeck
sn: Hamboeck
description: EAServer Developer



Listing 3


ldapcallerHome ldapHome // EJB's home interface
ldapcallerbean ldap // EJB's remote interface

long ll_result

n_connect ln_connect
ln_connect = CREATE n_connect
ln_connect.ConnectToServer()

//Get the home interface

ll_result = ln_connect.Lookup(ldapHome, "myLDAP/LDAPCaller", &
"at.bhitcon.ldap.LDAPCallerHome")

//Get a reference to Cart component's business logic

try 
ldap = ldapHome.Create() 
catch (ctscomponents_createexception ex) 
MessageBox("","Exception :(")
end try

ldapparam lstr_param
ldapreturn lstr_return

lstr_param.authenticate = true;
lstr_param.LDAPUser = sle_user.text;
lstr_param.LDAPPwd = sle_password.text;
lstr_param.LDAPHost="localhost"
lstr_param.LDAPPort= 389;
lstr_param.LDAPDN ="";
lstr_param.LDAPAttrNames[1]=""; //TODO


lstr_return = ldap.ldapAuthenticate(lstr_param)

MessageBox("LDAP", "Success: " + String(lstr_return.ldapsuccess) 

+ "~r~n~r~n" + lstr_return.errorString)

ln_connect.DisconnectServer()
DESTROY ln_connect