Toon posts:

debian sarge slapd phpLDAPadmin error

Pagina: 1
Acties:

Verwijderd

Topicstarter
Geachte tweakers,

Ik probeer een Ldap server op te zetten maar ik ben vrij vroeg in de installatie al tegen een probleem aangelopen.

als ik op phpLDAPadmin wil inloggen met admin en dan password dan krijg ik de volgende error
ik raak dus ook niet ingelogd als admin, wat natuurlijk erg vervelend is.

Fout
Could not bind to the LDAP server.

LDAP zegt: Type or value exists


Foutnummer: 0x14(LDAP_TYPE_OR_VALUE_EXISTS)


Omschrijving: An attribute type or attribute value specified already exists in the entry


echter als ik als Anonymous Bind inlog krijg ik de ldap tree te zien zoals hij hoort te zijn.

iemand enig idee hoe en wat deze error veroorzaakt en wat ik er eventueel aan zou kunnen doen

Mochten jullie meer info nodig hebben, wat natuurlijk begrijpelijk is, dan post ik dat zo snel mogelijk alsvast heel erg bedankt

  • Stamgastje
  • Registratie: April 2003
  • Laatst online: 02-02-2020
Gebruik je wel de goede bind name? Dus zoiets als: cn=admin,dc=example,dc=com (als je domein example.com is)?

Verwijderd

Topicstarter
ik post hieronder even de een stukje van de config.php van phpldapadmin
PHP:
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Three options for auth_type:
   1. 'cookie': you will login via a web form, and a client-side cookie will store your
      login dn and password.
   2. 'session': same as cookie but your login dn and password are stored on the web server in
      a persistent session variable.
   3. 'config': specify your login dn and password here in this config file. No login will be
      required to use phpLDAPadmin for this server.

   Choose wisely to protect your authentication information appropriately for your situation. If
   you choose 'cookie', your cookie contents will be encrypted using blowfish and the secret your specify
   above as session['blowfish']. */
$ldapservers->SetValue($i,'server','auth_type','session');

/* The DN of the user for phpLDAPadmin to bind with. For anonymous binds or 'cookie' or 'session' auth_types,
   leave the login_dn and login_pass blank. If you specify a login_attr in conjunction with a cookie or
   session auth_type, then you can also specify the login_dn/login_pass here for searching the directory for
   users (ie, if your LDAP server does not allow anonymous binds. */
$ldapservers->SetValue($i,'login','dn','cn=admin,dc=colsonsmb,dc=nl');

/* Your LDAP password. If you specified an empty login_dn above, this MUST also be blank. */
$ldapservers->SetValue($i,'login','pass','');


vergelijkend stukje uit slapd.conf

PHP:
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#######################################################################
# 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=colsonsmb,dc=nl"

# 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=colsonsmb,dc=nl" write
        by anonymous auth
        by self write
        by * none

Verwijderd

Topicstarter
stukje uit m'n hosts file op de server

127.0.0.1 localhost.localdomain localhost
192.168.31.41 samba.colsonsmb.nl samba

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Verwijderd

Topicstarter
Ondertussen al weer wat verder met de installatie van ldap / samba, maar phpLDAPadmin wil nog steeds niet vlotten, ik krijg als ik als admin inlog nog steeds deze fout
Fout
Could not bind to the LDAP server.

LDAP zegt: Type or value exists


Foutnummer: 0x14(LDAP_TYPE_OR_VALUE_EXISTS)


Omschrijving: An attribute type or attribute value specified already exists in the entry
komt iemand deze fout bekend voor of heeft iemand een idee hoe ik dit kan oplossen?

alvast super heel erg bedankt

Verwijderd

je kan het debuglevel van je LDAP server wat hoger zetten en dan kijken wat er in /var/log/debug verschijnt.

werkt dit wel:
code:
1
ldapsearch -b "dc=colsonsmb,dc=nl" -x "(objectClass=*)"


Staat in deze files nog iets interessants:
/etc/ldap/ldap.conf
~/ldaprc
~/.ldaprc
ldaprc

Verwijderd

Topicstarter
code:
1
samba:/home/dennis# ldapsearch -b "dc=colsonsmb,dc=nl" -x "(objectClass=*)"

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# extended LDIF
#
# LDAPv3
# base <dc=colsonsmb,dc=nl> with scope sub
# filter: (objectClass=*)
# requesting: ALL
#

# colsonsmb.nl
dn: dc=colsonsmb,dc=nl
objectClass: top
objectClass: dcObject
objectClass: organization
o: colson
dc: colsonsmb

# admin, colsonsmb.nl
dn: cn=admin,dc=colsonsmb,dc=nl
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator

# People, colsonsmb.nl
dn: ou=People,dc=colsonsmb,dc=nl
ou: People
objectClass: top
objectClass: organizationalUnit

# Group, colsonsmb.nl
dn: ou=Group,dc=colsonsmb,dc=nl
ou: Group
objectClass: top
objectClass: organizationalUnit

# ldapusers, Group, colsonsmb.nl
dn: cn=ldapusers,ou=Group,dc=colsonsmb,dc=nl
objectClass: posixGroup
objectClass: top
cn: ldapusers
gidNumber: 9000

# Test, People, colsonsmb.nl
dn: cn=Test,ou=People,dc=colsonsmb,dc=nl
cn: Test
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
sn: User
uid: test
uidNumber: 1025
gidNumber: 9000
homeDirectory: /tmp

# COLSONSMB, colsonsmb.nl
dn: sambaDomainName=COLSONSMB,dc=colsonsmb,dc=nl
sambaDomainName: COLSONSMB
sambaSID: S-1-5-21-2716194319-1698284132-1593914896
sambaAlgorithmicRidBase: 1000
objectClass: sambaDomain

# search result
search: 2
result: 0 Success

# numResponses: 8
# numEntries: 7


hieronder stukje ldap.conf

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v 1.9 2000/09/04 19:57:01 kurt
 Exp $
#
# LDAP Defaults
#

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

BASE    dc=colsonsmb, dc=nl
URI     ldap://localhost
#URI    ldap://ldap.example.com ldap://ldap-master.example.com:666

#SIZELIMIT      12
#TIMELIMIT      15
#DEREF          never

[ Voor 5% gewijzigd door Verwijderd op 15-11-2005 08:36 ]


Verwijderd

Topicstarter
ik heb de oplossing

Yup, the default for PLA in 0.9.7.1 is a "uid" based
login
(I have since changed it back to a "dn" login).

Just set the login,attr to "dn" in config.php and
you'll be
able to do your DN based login.

Dus na aanpassing van deze waarde "uid" naar dn was het probleem opgelost

_/-\o_

dank jullie allemaal voor jullie hulp
Pagina: 1