Bonjour,

Je regarde sur le net comment fonctionne l'annuaire LDAP, déjà, ça commence mal
J'ai trouvé ce tuto, j'ai crée dans le dossier C:\OpenLDAP\ldifdata le fichier step1.LDIF avec ce contenu :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
## DEFINE DIT ROOT/BASE/SUFFIX ####

## uses RFC 2377 format

## replace maxcrc and com as necessary below

## or for experimentation leave as is


## dcObject is an AUXILLIARY objectclass and MUST

## have a STRUCTURAL objectclass (organization in this case)

# this is an ENTRY sequence and is preceded by a BLANK line


dn: dc=maxcrc,dc=com

dc: maxcrc

description: My wonderful company as much text as you want to place

objectClass: dcObject

objectClass: organization

o: Maxcrc, Inc.


## FIRST Level hierarchy - people 

## uses mixed upper and lower case for objectclass

# this is an ENTRY sequence and is preceded by a BLANK line


dn: ou=people, dc=maxcrc,dc=com

ou: people

description: All people in organisation

objectclass: organizationalunit


## SECOND Level hierarchy

## ADD a single entry under FIRST (people) level

# this is an ENTRY sequence and is preceded by a BLANK line

# the ou: Human Resources is the department name


dn: cn=Robert Smith,ou=people,dc=maxcrc,dc=com

objectclass: inetOrgPerson

cn: Robert Smith

cn: Robert J Smith

cn: bob  smith

sn: smith

uid: rjsmith

userpassword: rJsmitH

carlicense: HISCAR 123

homephone: 555-111-2222

add: mail

mail: r.smith@example.com

mail: rsmith@example.com

mail: bob.smith@example.com

description: swell guy

ou: Human Resources
Dans ce même dossier, j'ai un fichier en .BAT avec ce contenu :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
cd C:\OpenLDAP\ClientTools
ldapmodify.exe -a -x -h localhost -p 389 -D "cn=manager,dc=maxcrc,dc=com" -f c:\OpenLDAP\ldifdata\step1.ldif -w secret 
PAUSE
la commande n'a pas fonctionné, voici ce que j'obtiens dans la console :

C:\OpenLDAP\ClientTools>ldapmodify.exe -a -x -h localhost -p 389 -D "cn=manager,
dc=maxcrc,dc=com" -f c:\OpenLDAP\ldifdata\step1.ldif -w secret
ldap_connect_to_host: TCP localhost:389
ldap_new_socket: 468
ldap_prepare_socket: 468
ldap_connect_to_host: Trying ::1 389
ldap_pvt_connect: fd: 468 tm: -1 async: 0
attempting to connect:
connect success
adding new entry "dc=maxcrc,dc=com"
ldap_add: Protocol error (2)
additional info: no attributes provided
Auriez-vous une idée de ce qui cloche?
Merci