IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Réseau Discussion :

Open Ldap - problème authentification pour ajout donnees


Sujet :

Réseau

  1. #1
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut Open Ldap - problème authentification pour ajout donnees
    Bonjour,

    je souhaite débuter à remplir mon annuraire ldap. J'ai préparé un fichier ldif. J'ai configuré mon slapd.conf.
    Mais lors ce que je tape la commande:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ldapadd -D 'cn=admin,o=toto' -W -f dit.ldif
    l'authentification echoue, pourtant j'indique bien mon utilisateur mis dans "slapd.conf" avec le mot de passe approprié (en clair car dans le slap.conf il est crypté en {MD5} ).
    le message d'erreur est le suivant:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    ldap_sasl_interactive_bind_s: Internal (implementation specific) error (80)
            additional info: SASL(-13): user not found: no secret in database
    Avez vous une idée du problème ?

  2. #2
    Expert éminent sénior

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Points : 17 778
    Points
    17 778
    Par défaut
    Et en ajoutant à ta commande l'option -x ? (afin d'utiliser la méthode dite simple d'authentification).


    Cordialement, Julp

  3. #3
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut
    je viens d'essayer et dans ce cas là, il me demande toujours le mot de passe, et me met une erreur différente:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ldap_bind: Invalid credentials (49)

    Et si j'enlève le "-W" j'ai l'erreur suivante:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    ldap_bind: Server is unwilling to perform (53)
            additional info: unauthenticated bind (DN with no password) disallowed
    que j'ai du mal à comprendre vu que mon utilisateur admin a un mot de passe

  4. #4
    Expert éminent sénior

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Points : 17 778
    Points
    17 778
    Par défaut
    Avez-vous bien employé la commande slappasswd pour chiffrer le mot de passe du manager LDAP figurant dans slapd.conf ?


    Cordialement, Julp

  5. #5
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut
    oui et j'ai de plus essayé avec un mot de passe en clair sans plus de succès

  6. #6
    Expert éminent sénior

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Points : 17 778
    Points
    17 778
    Par défaut
    Vérifier la configuration de votre client (/etc/ldap.conf en général pour Linux), préciser le serveur (option -h/-p ou -H), le DN de votre LDAP Manager et que votre serveur est bien en fonctionnement. Activer également les options de débogages (-d -1 pour client et serveur) afin d'éventuellement obtenir de plus amples informations sur la cause de l'erreur (DN non reconnu, problème au niveau du mot de passe, ...).


    Amicalement, Julp

  7. #7
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut
    j'ai essayé de vérifier le fichier /etc/ldap.conf de préciser le serveur, le DN et que le service "slapd" était bien lancé. Et mes problèmes sont toujours là
    Je n'ai pas réussi à faire fonctionner le mode debug par contre, il apparait qu'il faut indiquer un "debuglevel" mais je ne sais pas quoi indiquer :

  8. #8
    Expert éminent sénior

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Points : 17 778
    Points
    17 778
    Par défaut
    Vous pouvez ajouter des options pour le démarrage de slapd malgré que sur les versions Linux à base de RPM, le démarrage de l'annuaire s'avère automatiser (script dans /etc/rc.d/init.d/). La directive de log est loglevel et la valeur -1 est le mode le plus verbeux.

    Prenez la bonne habitude d'aller sur le site officiel d'OpenLDAP où l'on trouve tous ces détails.


    Cordialement, Julp

  9. #9
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut
    ok, merci pour cette précision !
    Par contre avec l'option debug, je ne voit pas d'indication pouvant m'aider.
    Une chose bizarrre toutefois, l'utilisateur "root" traine vers la fin du log alors que j'en ai changé pour "Manager" vu que je suis sous Openldap (je voulais voir si ça rglait le problème), mais c'est peut-être le nom de mon utilisateur linux (je suis connecté avec celui-ci)
    Voici la trace (désolé c'est assez long) :
    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
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    #ldapadd -v -D 'cn=Manager,o=toto,c=com' -h localhost -W -d -1 -f dit.ldif
    ldap_initialize( ldap://localhost )
    ldap_create
    ldap_url_parse_ext(ldap://localhost)
    Enter LDAP Password:
    ldap_pvt_sasl_getmech
    ldap_search
    put_filter: "(objectclass=*)"
    put_filter: simple
    put_simple_filter: "objectclass=*"
    ldap_send_initial_request
    ldap_new_connection
    ldap_int_open_connection
    ldap_connect_to_host: TCP localhost:389
    ldap_new_socket: 4
    ldap_prepare_socket: 4
    ldap_connect_to_host: Trying 127.0.0.1:389
    ldap_connect_timeout: fd: 4 tm: -1 async: 0
    ldap_ndelay_on: 4
    ldap_is_sock_ready: 4
    ldap_ndelay_off: 4
    ldap_open_defconn: successful
    ldap_send_server_request
    ber_flush: 64 bytes to sd 4
      0000:  30 3e 02 01 01 63 39 04  00 0a 01 00 0a 01 00 02   0>...c9.........
      0010:  01 00 02 01 00 01 01 00  87 0b 6f 62 6a 65 63 74   ..........object
      0020:  63 6c 61 73 73 30 19 04  17 73 75 70 70 6f 72 74   class0...support
      0030:  65 64 53 41 53 4c 4d 65  63 68 61 6e 69 73 6d 73   edSASLMechanisms
    ldap_write: want=64, written=64
      0000:  30 3e 02 01 01 63 39 04  00 0a 01 00 0a 01 00 02   0>...c9.........
      0010:  01 00 02 01 00 01 01 00  87 0b 6f 62 6a 65 63 74   ..........object
      0020:  63 6c 61 73 73 30 19 04  17 73 75 70 70 6f 72 74   class0...support
      0030:  65 64 53 41 53 4c 4d 65  63 68 61 6e 69 73 6d 73   edSASLMechanisms
    ldap_result msgid 1
    ldap_chkResponseList for msgid=1, all=1
    ldap_chkResponseList returns NULL
    wait4msg (infinite timeout), msgid 1
    wait4msg continue, msgid 1, all 1
    ** Connections:
    * host: localhost  port: 389  (default)
      refcnt: 2  status: Connected
      last used: Wed Oct 19 08:34:05 2005
     
    ** Outstanding Requests:
     * msgid 1,  origid 1, status InProgress
       outstanding referrals 0, parent count 0
    ** Response Queue:
       Empty
    ldap_chkResponseList for msgid=1, all=1
    ldap_chkResponseList returns NULL
    ldap_int_select
    read1msg: msgid 1, all 1
    ber_get_next
    ldap_read: want=8, got=8
      0000:  30 3c 02 01 01 64 37 04                            0<...d7.
    ldap_read: want=54, got=54
      0000:  00 30 33 30 31 04 17 73  75 70 70 6f 72 74 65 64   .0301..supported
      0010:  53 41 53 4c 4d 65 63 68  61 6e 69 73 6d 73 31 16   SASLMechanisms1.
      0020:  04 0a 44 49 47 45 53 54  2d 4d 44 35 04 08 43 52   ..DIGEST-MD5..CR
      0030:  41 4d 2d 4d 44 35                                  AM-MD5
    ber_get_next: tag 0x30 len 60 contents:
    ber_dump: buf=0x08905578 ptr=0x08905578 end=0x089055b4 len=60
      0000:  02 01 01 64 37 04 00 30  33 30 31 04 17 73 75 70   ...d7..0301..sup
      0010:  70 6f 72 74 65 64 53 41  53 4c 4d 65 63 68 61 6e   portedSASLMechan
      0020:  69 73 6d 73 31 16 04 0a  44 49 47 45 53 54 2d 4d   isms1...DIGEST-M
      0030:  44 35 04 08 43 52 41 4d  2d 4d 44 35               D5..CRAM-MD5
    ldap_read: message type search-entry msgid 1, original id 1
    wait4msg continue, msgid 1, all 1
    ** Connections:
    * host: localhost  port: 389  (default)
      refcnt: 2  status: Connected
      last used: Wed Oct 19 08:34:05 2005
     
    ** Outstanding Requests:
     * msgid 1,  origid 1, status InProgress
       outstanding referrals 0, parent count 0
    ** Response Queue:
     * msgid 1,  type 100
    ldap_chkResponseList for msgid=1, all=1
    ldap_chkResponseList returns NULL
    ldap_int_select
    read1msg: msgid 1, all 1
    ber_get_next
    ldap_read: want=8, got=8
      0000:  30 0c 02 01 01 65 07 0a                            0....e..
    ldap_read: want=6, got=6
      0000:  01 00 04 00 04 00                                  ......
    ber_get_next: tag 0x30 len 12 contents:
    ber_dump: buf=0x08905618 ptr=0x08905618 end=0x08905624 len=12
      0000:  02 01 01 65 07 0a 01 00  04 00 04 00               ...e........
    ldap_read: message type search-result msgid 1, original id 1
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x08905618 ptr=0x0890561b end=0x08905624 len=9
      0000:  65 07 0a 01 00 04 00 04  00                        e........
    read1msg:  0 new referrals
    read1msg:  mark request completed, id = 1
    request 1 done
    res_errno: 0, res_error: <>, res_matched: <>
    ldap_free_request (origid 1, msgid 1)
    ldap_free_connection
    ldap_free_connection: refcnt 1
    adding response id 1 type 101:
    ldap_parse_result
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x08905618 ptr=0x0890561b end=0x08905624 len=9
      0000:  65 07 0a 01 00 04 00 04  00                        e........
    ber_scanf fmt (}) ber:
    ber_dump: buf=0x08905618 ptr=0x08905624 end=0x08905624 len=0
     
    ldap_get_values
    ber_scanf fmt ({x{{a) ber:
    ber_dump: buf=0x08905578 ptr=0x0890557b end=0x089055b4 len=57
      0000:  64 37 04 00 30 33 30 31  04 17 73 75 70 70 6f 72   d7..0301..suppor
      0010:  74 65 64 53 41 53 4c 4d  65 63 68 61 6e 69 73 6d   tedSASLMechanism
      0020:  73 31 16 04 0a 44 49 47  45 53 54 2d 4d 44 35 04   s1...DIGEST-MD5.
      0030:  08 43 52 41 4d 2d 4d 44  35                        .CRAM-MD5
    ber_scanf fmt ([v]) ber:
    ber_dump: buf=0x08905578 ptr=0x0890559c end=0x089055b4 len=24
      0000:  31 16 04 0a 44 49 47 45  53 54 2d 4d 44 35 04 08   1...DIGEST-MD5..
      0010:  43 52 41 4d 2d 4d 44 35                            CRAM-MD5
    ldap_msgfree
    ldap_sasl_interactive_bind_s: server supports: DIGEST-MD5 CRAM-MD5
    ldap_int_sasl_bind: DIGEST-MD5 CRAM-MD5
    ldap_int_sasl_open: host=laroze
    SASL/DIGEST-MD5 authentication started
    ldap_sasl_bind_s
    ldap_sasl_bind
    ldap_send_initial_request
    ldap_send_server_request
    ber_flush: 61 bytes to sd 4
      0000:  30 3b 02 01 02 60 36 02  01 03 04 23 63 6e 3d 4d   0;...`6....#cn=M
      0010:  61 6e 61 67 65 72 2c 6f  3d 63 6f 66 72 61 6d 69   anager,o=toto
      0020:  2d 74 6f 75 6c 6f 75 73  65 2c 63 3d 63 6f 6d a3   ,c=com.
      0030:  0c 04 0a 44 49 47 45 53  54 2d 4d 44 35            ...DIGEST-MD5
    ldap_write: want=61, written=61
      0000:  30 3b 02 01 02 60 36 02  01 03 04 23 63 6e 3d 4d   0;...`6....#cn=M
      0010:  61 6e 61 67 65 72 2c 6f  3d 63 6f 66 72 61 6d 69   anager,o=toto
      0020:  2d 74 6f 75 6c 6f 75 73  65 2c 63 3d 63 6f 6d a3   toto,c=com.
      0030:  0c 04 0a 44 49 47 45 53  54 2d 4d 44 35            ...DIGEST-MD5
    ldap_result msgid 2
    ldap_chkResponseList for msgid=2, all=1
    ldap_chkResponseList returns NULL
    wait4msg (infinite timeout), msgid 2
    wait4msg continue, msgid 2, all 1
    ** Connections:
    * host: localhost  port: 389  (default)
      refcnt: 2  status: Connected
      last used: Wed Oct 19 08:34:05 2005
     
    ** Outstanding Requests:
     * msgid 2,  origid 2, status InProgress
       outstanding referrals 0, parent count 0
    ** Response Queue:
       Empty
    ldap_chkResponseList for msgid=2, all=1
    ldap_chkResponseList returns NULL
    ldap_int_select
    read1msg: msgid 2, all 1
    ber_get_next
    ldap_read: want=8, got=8
      0000:  30 81 c3 02 01 02 61 81                            0.....a.
    ldap_read: want=190, got=190
      0000:  bd 0a 01 0e 04 00 04 00  87 81 b3 6e 6f 6e 63 65   ...........nonce
      0010:  3d 22 59 30 4a 44 2f 79  39 2f 6a 7a 78 49 2f 32   ="Y0JD/y9/jzxI/2
      0020:  51 44 65 77 2f 56 31 76  35 73 6e 55 4d 61 2f 77   QDew/V1v5snUMa/w
      0030:  70 67 52 67 69 43 4f 4d  34 39 31 44 4d 3d 22 2c   pgRgiCOM491DM=",
      0040:  72 65 61 6c 6d 3d 22 6c  61 72 6f 7a 65 22 2c 71   realm="laroze",q
      0050:  6f 70 3d 22 61 75 74 68  2c 61 75 74 68 2d 69 6e   op="auth,auth-in
      0060:  74 2c 61 75 74 68 2d 63  6f 6e 66 22 2c 63 69 70   t,auth-conf",cip
      0070:  68 65 72 3d 22 72 63 34  2d 34 30 2c 72 63 34 2d   her="rc4-40,rc4-
      0080:  35 36 2c 72 63 34 2c 64  65 73 2c 33 64 65 73 22   56,rc4,des,3des"
      0090:  2c 6d 61 78 62 75 66 3d  36 35 35 33 36 2c 63 68   ,maxbuf=65536,ch
      00a0:  61 72 73 65 74 3d 75 74  66 2d 38 2c 61 6c 67 6f   arset=utf-8,algo
      00b0:  72 69 74 68 6d 3d 6d 64  35 2d 73 65 73 73         rithm=md5-sess
    ber_get_next: tag 0x30 len 195 contents:
    ber_dump: buf=0x089092c0 ptr=0x089092c0 end=0x08909383 len=195
      0000:  02 01 02 61 81 bd 0a 01  0e 04 00 04 00 87 81 b3   ...a............
      0010:  6e 6f 6e 63 65 3d 22 59  30 4a 44 2f 79 39 2f 6a   nonce="Y0JD/y9/j
      0020:  7a 78 49 2f 32 51 44 65  77 2f 56 31 76 35 73 6e   zxI/2QDew/V1v5sn
      0030:  55 4d 61 2f 77 70 67 52  67 69 43 4f 4d 34 39 31   UMa/wpgRgiCOM491
      0040:  44 4d 3d 22 2c 72 65 61  6c 6d 3d 22 6c 61 72 6f   DM=",realm="laro
      0050:  7a 65 22 2c 71 6f 70 3d  22 61 75 74 68 2c 61 75   ze",qop="auth,au
      0060:  74 68 2d 69 6e 74 2c 61  75 74 68 2d 63 6f 6e 66   th-int,auth-conf
      0070:  22 2c 63 69 70 68 65 72  3d 22 72 63 34 2d 34 30   ",cipher="rc4-40
      0080:  2c 72 63 34 2d 35 36 2c  72 63 34 2c 64 65 73 2c   ,rc4-56,rc4,des,
      0090:  33 64 65 73 22 2c 6d 61  78 62 75 66 3d 36 35 35   3des",maxbuf=655
      00a0:  33 36 2c 63 68 61 72 73  65 74 3d 75 74 66 2d 38   36,charset=utf-8
      00b0:  2c 61 6c 67 6f 72 69 74  68 6d 3d 6d 64 35 2d 73   ,algorithm=md5-s
      00c0:  65 73 73                                           ess
    ldap_read: message type bind msgid 2, original id 2
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x089092c0 ptr=0x089092c3 end=0x08909383 len=192
      0000:  61 81 bd 0a 01 0e 04 00  04 00 87 81 b3 6e 6f 6e   a............non
      0010:  63 65 3d 22 59 30 4a 44  2f 79 39 2f 6a 7a 78 49   ce="Y0JD/y9/jzxI
      0020:  2f 32 51 44 65 77 2f 56  31 76 35 73 6e 55 4d 61   /2QDew/V1v5snUMa
      0030:  2f 77 70 67 52 67 69 43  4f 4d 34 39 31 44 4d 3d   /wpgRgiCOM491DM=
      0040:  22 2c 72 65 61 6c 6d 3d  22 6c 61 72 6f 7a 65 22   ",realm="laroze"
      0050:  2c 71 6f 70 3d 22 61 75  74 68 2c 61 75 74 68 2d   ,qop="auth,auth-
      0060:  69 6e 74 2c 61 75 74 68  2d 63 6f 6e 66 22 2c 63   int,auth-conf",c
      0070:  69 70 68 65 72 3d 22 72  63 34 2d 34 30 2c 72 63   ipher="rc4-40,rc
      0080:  34 2d 35 36 2c 72 63 34  2c 64 65 73 2c 33 64 65   4-56,rc4,des,3de
      0090:  73 22 2c 6d 61 78 62 75  66 3d 36 35 35 33 36 2c   s",maxbuf=65536,
      00a0:  63 68 61 72 73 65 74 3d  75 74 66 2d 38 2c 61 6c   charset=utf-8,al
      00b0:  67 6f 72 69 74 68 6d 3d  6d 64 35 2d 73 65 73 73   gorithm=md5-sess
    read1msg:  0 new referrals
    read1msg:  mark request completed, id = 2
    request 2 done
    res_errno: 0, res_error: <>, res_matched: <>
    ldap_free_request (origid 2, msgid 2)
    ldap_free_connection
    ldap_free_connection: refcnt 1
    ldap_parse_sasl_bind_result
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x089092c0 ptr=0x089092c3 end=0x08909383 len=192
      0000:  61 81 bd 0a 01 0e 04 00  04 00 87 81 b3 6e 6f 6e   a............non
      0010:  63 65 3d 22 59 30 4a 44  2f 79 39 2f 6a 7a 78 49   ce="Y0JD/y9/jzxI
      0020:  2f 32 51 44 65 77 2f 56  31 76 35 73 6e 55 4d 61   /2QDew/V1v5snUMa
      0030:  2f 77 70 67 52 67 69 43  4f 4d 34 39 31 44 4d 3d   /wpgRgiCOM491DM=
      0040:  22 2c 72 65 61 6c 6d 3d  22 6c 61 72 6f 7a 65 22   ",realm="laroze"
      0050:  2c 71 6f 70 3d 22 61 75  74 68 2c 61 75 74 68 2d   ,qop="auth,auth-
      0060:  69 6e 74 2c 61 75 74 68  2d 63 6f 6e 66 22 2c 63   int,auth-conf",c
      0070:  69 70 68 65 72 3d 22 72  63 34 2d 34 30 2c 72 63   ipher="rc4-40,rc
      0080:  34 2d 35 36 2c 72 63 34  2c 64 65 73 2c 33 64 65   4-56,rc4,des,3de
      0090:  73 22 2c 6d 61 78 62 75  66 3d 36 35 35 33 36 2c   s",maxbuf=65536,
      00a0:  63 68 61 72 73 65 74 3d  75 74 66 2d 38 2c 61 6c   charset=utf-8,al
      00b0:  67 6f 72 69 74 68 6d 3d  6d 64 35 2d 73 65 73 73   gorithm=md5-sess
    ber_scanf fmt (O) ber:
    ber_dump: buf=0x089092c0 ptr=0x089092cd end=0x08909383 len=182
      0000:  87 81 b3 6e 6f 6e 63 65  3d 22 59 30 4a 44 2f 79   ...nonce="Y0JD/y
      0010:  39 2f 6a 7a 78 49 2f 32  51 44 65 77 2f 56 31 76   9/jzxI/2QDew/V1v
      0020:  35 73 6e 55 4d 61 2f 77  70 67 52 67 69 43 4f 4d   5snUMa/wpgRgiCOM
      0030:  34 39 31 44 4d 3d 22 2c  72 65 61 6c 6d 3d 22 6c   491DM=",realm="l
      0040:  61 72 6f 7a 65 22 2c 71  6f 70 3d 22 61 75 74 68   aroze",qop="auth
      0050:  2c 61 75 74 68 2d 69 6e  74 2c 61 75 74 68 2d 63   ,auth-int,auth-c
      0060:  6f 6e 66 22 2c 63 69 70  68 65 72 3d 22 72 63 34   onf",cipher="rc4
      0070:  2d 34 30 2c 72 63 34 2d  35 36 2c 72 63 34 2c 64   -40,rc4-56,rc4,d
      0080:  65 73 2c 33 64 65 73 22  2c 6d 61 78 62 75 66 3d   es,3des",maxbuf=
      0090:  36 35 35 33 36 2c 63 68  61 72 73 65 74 3d 75 74   65536,charset=ut
      00a0:  66 2d 38 2c 61 6c 67 6f  72 69 74 68 6d 3d 6d 64   f-8,algorithm=md
      00b0:  35 2d 73 65 73 73                                  5-sess
    ldap_parse_result
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x089092c0 ptr=0x089092c3 end=0x08909383 len=192
      0000:  61 81 bd 0a 01 0e 04 00  04 00 87 81 b3 6e 6f 6e   a............non
      0010:  63 65 3d 22 59 30 4a 44  2f 79 39 2f 6a 7a 78 49   ce="Y0JD/y9/jzxI
      0020:  2f 32 51 44 65 77 2f 56  31 76 35 73 6e 55 4d 61   /2QDew/V1v5snUMa
      0030:  2f 77 70 67 52 67 69 43  4f 4d 34 39 31 44 4d 3d   /wpgRgiCOM491DM=
      0040:  22 2c 72 65 61 6c 6d 3d  22 6c 61 72 6f 7a 65 22   ",realm="laroze"
      0050:  2c 71 6f 70 3d 22 61 75  74 68 2c 61 75 74 68 2d   ,qop="auth,auth-
      0060:  69 6e 74 2c 61 75 74 68  2d 63 6f 6e 66 22 2c 63   int,auth-conf",c
      0070:  69 70 68 65 72 3d 22 72  63 34 2d 34 30 2c 72 63   ipher="rc4-40,rc
      0080:  34 2d 35 36 2c 72 63 34  2c 64 65 73 2c 33 64 65   4-56,rc4,des,3de
      0090:  73 22 2c 6d 61 78 62 75  66 3d 36 35 35 33 36 2c   s",maxbuf=65536,
      00a0:  63 68 61 72 73 65 74 3d  75 74 66 2d 38 2c 61 6c   charset=utf-8,al
      00b0:  67 6f 72 69 74 68 6d 3d  6d 64 35 2d 73 65 73 73   gorithm=md5-sess
    ber_scanf fmt (x) ber:
    ber_dump: buf=0x089092c0 ptr=0x089092cd end=0x08909383 len=182
      0000:  87 81 b3 6e 6f 6e 63 65  3d 22 59 30 4a 44 2f 79   ...nonce="Y0JD/y
      0010:  39 2f 6a 7a 78 49 2f 32  51 44 65 77 2f 56 31 76   9/jzxI/2QDew/V1v
      0020:  35 73 6e 55 4d 61 2f 77  70 67 52 67 69 43 4f 4d   5snUMa/wpgRgiCOM
      0030:  34 39 31 44 4d 3d 22 2c  72 65 61 6c 6d 3d 22 6c   491DM=",realm="l
      0040:  61 72 6f 7a 65 22 2c 71  6f 70 3d 22 61 75 74 68   aroze",qop="auth
      0050:  2c 61 75 74 68 2d 69 6e  74 2c 61 75 74 68 2d 63   ,auth-int,auth-c
      0060:  6f 6e 66 22 2c 63 69 70  68 65 72 3d 22 72 63 34   onf",cipher="rc4
      0070:  2d 34 30 2c 72 63 34 2d  35 36 2c 72 63 34 2c 64   -40,rc4-56,rc4,d
      0080:  65 73 2c 33 64 65 73 22  2c 6d 61 78 62 75 66 3d   es,3des",maxbuf=
      0090:  36 35 35 33 36 2c 63 68  61 72 73 65 74 3d 75 74   65536,charset=ut
      00a0:  66 2d 38 2c 61 6c 67 6f  72 69 74 68 6d 3d 6d 64   f-8,algorithm=md
      00b0:  35 2d 73 65 73 73                                  5-sess
    ber_scanf fmt (}) ber:
    ber_dump: buf=0x089092c0 ptr=0x08909383 end=0x08909383 len=0
     
    ldap_msgfree
    sasl_client_step: 2
    sasl_client_step: 1
    ldap_sasl_bind_s
    ldap_sasl_bind
    ldap_send_initial_request
    ldap_send_server_request
    ber_flush: 324 bytes to sd 4
      0000:  30 82 01 40 02 01 03 60  82 01 39 02 01 03 04 23   0..@...`..9....#
      0010:  63 6e 3d 4d 61 6e 61 67  65 72 2c 6f 3d 63 6f 66   cn=Manager,o=
      0020:  72 61 6d 69 2d 74 6f 75  6c 6f 75 73 65 2c 63 3d   toto,c=
      0030:  63 6f 6d a3 82 01 0d 04  0a 44 49 47 45 53 54 2d   com......DIGEST-
      0040:  4d 44 35 04 81 fe 75 73  65 72 6e 61 6d 65 3d 22   MD5...username="
      0050:  72 6f 6f 74 22 2c 72 65  61 6c 6d 3d 22 6c 61 72   root",realm="lar
      0060:  6f 7a 65 22 2c 6e 6f 6e  63 65 3d 22 59 30 4a 44   oze",nonce="Y0JD
      0070:  2f 79 39 2f 6a 7a 78 49  2f 32 51 44 65 77 2f 56   /y9/jzxI/2QDew/V
      0080:  31 76 35 73 6e 55 4d 61  2f 77 70 67 52 67 69 43   1v5snUMa/wpgRgiC
      0090:  4f 4d 34 39 31 44 4d 3d  22 2c 63 6e 6f 6e 63 65   OM491DM=",cnonce
      00a0:  3d 22 5a 43 6b 43 66 46  2b 61 44 61 53 6b 39 74   ="ZCkCfF+aDaSk9t
      00b0:  69 78 6a 2b 36 71 62 55  73 38 6d 6f 4b 55 70 4c   ixj+6qbUs8moKUpL
      00c0:  78 39 6f 55 43 70 2b 4d  47 73 63 4b 6f 3d 22 2c   x9oUCp+MGscKo=",
      00d0:  6e 63 3d 30 30 30 30 30  30 30 31 2c 71 6f 70 3d   nc=00000001,qop=
      00e0:  61 75 74 68 2d 63 6f 6e  66 2c 63 69 70 68 65 72   auth-conf,cipher
      00f0:  3d 72 63 34 2c 6d 61 78  62 75 66 3d 36 35 35 33   =rc4,maxbuf=6553
      0100:  36 2c 64 69 67 65 73 74  2d 75 72 69 3d 22 6c 64   6,digest-uri="ld
      0110:  61 70 2f 6c 61 72 6f 7a  65 22 2c 72 65 73 70 6f   ap/laroze",respo
      0120:  6e 73 65 3d 34 66 35 30  34 66 39 62 32 38 66 35   nse=4f504f9b28f5
      0130:  64 37 62 66 63 38 63 32  35 65 62 36 33 66 65 33   d7bfc8c25eb63fe3
      0140:  61 36 38 65                                        a68e
    ldap_write: want=324, written=324
      0000:  30 82 01 40 02 01 03 60  82 01 39 02 01 03 04 23   0..@...`..9....#
      0010:  63 6e 3d 4d 61 6e 61 67  65 72 2c 6f 3d 63 6f 66   cn=Manager,o=
      0020:  72 61 6d 69 2d 74 6f 75  6c 6f 75 73 65 2c 63 3d   toto,c=
      0030:  63 6f 6d a3 82 01 0d 04  0a 44 49 47 45 53 54 2d   com......DIGEST-
      0040:  4d 44 35 04 81 fe 75 73  65 72 6e 61 6d 65 3d 22   MD5...username="
      0050:  72 6f 6f 74 22 2c 72 65  61 6c 6d 3d 22 6c 61 72   root",realm="lar
      0060:  6f 7a 65 22 2c 6e 6f 6e  63 65 3d 22 59 30 4a 44   oze",nonce="Y0JD
      0070:  2f 79 39 2f 6a 7a 78 49  2f 32 51 44 65 77 2f 56   /y9/jzxI/2QDew/V
      0080:  31 76 35 73 6e 55 4d 61  2f 77 70 67 52 67 69 43   1v5snUMa/wpgRgiC
      0090:  4f 4d 34 39 31 44 4d 3d  22 2c 63 6e 6f 6e 63 65   OM491DM=",cnonce
      00a0:  3d 22 5a 43 6b 43 66 46  2b 61 44 61 53 6b 39 74   ="ZCkCfF+aDaSk9t
      00b0:  69 78 6a 2b 36 71 62 55  73 38 6d 6f 4b 55 70 4c   ixj+6qbUs8moKUpL
      00c0:  78 39 6f 55 43 70 2b 4d  47 73 63 4b 6f 3d 22 2c   x9oUCp+MGscKo=",
      00d0:  6e 63 3d 30 30 30 30 30  30 30 31 2c 71 6f 70 3d   nc=00000001,qop=
      00e0:  61 75 74 68 2d 63 6f 6e  66 2c 63 69 70 68 65 72   auth-conf,cipher
      00f0:  3d 72 63 34 2c 6d 61 78  62 75 66 3d 36 35 35 33   =rc4,maxbuf=6553
      0100:  36 2c 64 69 67 65 73 74  2d 75 72 69 3d 22 6c 64   6,digest-uri="ld
      0110:  61 70 2f 6c 61 72 6f 7a  65 22 2c 72 65 73 70 6f   ap/laroze",respo
      0120:  6e 73 65 3d 34 66 35 30  34 66 39 62 32 38 66 35   nse=4f504f9b28f5
      0130:  64 37 62 66 63 38 63 32  35 65 62 36 33 66 65 33   d7bfc8c25eb63fe3
      0140:  61 36 38 65                                        a68e
    ldap_result msgid 3
    ldap_chkResponseList for msgid=3, all=1
    ldap_chkResponseList returns NULL
    wait4msg (infinite timeout), msgid 3
    wait4msg continue, msgid 3, all 1
    ** Connections:
    * host: localhost  port: 389  (default)
      refcnt: 2  status: Connected
      last used: Wed Oct 19 08:34:05 2005
     
    ** Outstanding Requests:
     * msgid 3,  origid 3, status InProgress
       outstanding referrals 0, parent count 0
    ** Response Queue:
       Empty
    ldap_chkResponseList for msgid=3, all=1
    ldap_chkResponseList returns NULL
    ldap_int_select
    read1msg: msgid 3, all 1
    ber_get_next
    ldap_read: want=8, got=8
      0000:  30 3c 02 01 03 61 37 0a                            0<...a7.
    ldap_read: want=54, got=54
      0000:  01 50 04 00 04 30 53 41  53 4c 28 2d 31 33 29 3a   .P...0SASL(-13):
      0010:  20 75 73 65 72 20 6e 6f  74 20 66 6f 75 6e 64 3a    user not found:
      0020:  20 6e 6f 20 73 65 63 72  65 74 20 69 6e 20 64 61    no secret in da
      0030:  74 61 62 61 73 65                                  tabase
    ber_get_next: tag 0x30 len 60 contents:
    ber_dump: buf=0x089082e0 ptr=0x089082e0 end=0x0890831c len=60
      0000:  02 01 03 61 37 0a 01 50  04 00 04 30 53 41 53 4c   ...a7..P...0SASL
      0010:  28 2d 31 33 29 3a 20 75  73 65 72 20 6e 6f 74 20   (-13): user not
      0020:  66 6f 75 6e 64 3a 20 6e  6f 20 73 65 63 72 65 74   found: no secret
      0030:  20 69 6e 20 64 61 74 61  62 61 73 65                in database
    ldap_read: message type bind msgid 3, original id 3
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x089082e0 ptr=0x089082e3 end=0x0890831c len=57
      0000:  61 37 0a 01 50 04 00 04  30 53 41 53 4c 28 2d 31   a7..P...0SASL(-1
      0010:  33 29 3a 20 75 73 65 72  20 6e 6f 74 20 66 6f 75   3): user not fou
      0020:  6e 64 3a 20 6e 6f 20 73  65 63 72 65 74 20 69 6e   nd: no secret in
      0030:  20 64 61 74 61 62 61 73  65                         database
    read1msg:  0 new referrals
    read1msg:  mark request completed, id = 3
    request 3 done
    res_errno: 0, res_error: <>, res_matched: <>
    ldap_free_request (origid 3, msgid 3)
    ldap_free_connection
    ldap_free_connection: refcnt 1
    ldap_parse_sasl_bind_result
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x089082e0 ptr=0x089082e3 end=0x0890831c len=57
      0000:  61 37 0a 01 50 04 00 04  30 53 41 53 4c 28 2d 31   a7..P...0SASL(-1
      0010:  33 29 3a 20 75 73 65 72  20 6e 6f 74 20 66 6f 75   3): user not fou
      0020:  6e 64 3a 20 6e 6f 20 73  65 63 72 65 74 20 69 6e   nd: no secret in
      0030:  20 64 61 74 61 62 61 73  65                         database
    ldap_msgfree
    ldap_perror
    ldap_sasl_interactive_bind_s: Internal (implementation specific) error (80)
            additional info: SASL(-13): user not found: no secret in database

  10. #10
    Expert éminent sénior

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Points : 17 778
    Points
    17 778
    Par défaut
    Comme je l'ai déjà dit, vu que tu utilises l'utilisateur spécial de gestion de l'annuaire (déclaré dans le slapd.conf), il ne pourra pas le trouver en utilisant SASL, d'autant plus que cette méthode d'authentification ne semble pas configurée sur ton serveur. C'est pourquoi il te faut utiliser l'option -x pour une authentification simple.


    Amicalement, Julp

  11. #11
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut
    eh bien, en utilisatant l'option "-x", j'ai directement la trace suivante, sans pouvoir taper de mot de passe:
    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
    86
    87
    88
    89
    90
    91
    92
    93
    # ldapadd -v -D 'cn=Manager,o=toto,c=com' -h localhost -x -d -1 -f dit.ldif
    ldap_initialize( ldap://localhost )
    ldap_create
    ldap_url_parse_ext(ldap://localhost)
    ldap_bind_s
    ldap_simple_bind_s
    ldap_sasl_bind_s
    ldap_sasl_bind
    ldap_send_initial_request
    ldap_new_connection
    ldap_int_open_connection
    ldap_connect_to_host: TCP localhost:389
    ldap_new_socket: 4
    ldap_prepare_socket: 4
    ldap_connect_to_host: Trying 127.0.0.1:389
    ldap_connect_timeout: fd: 4 tm: -1 async: 0
    ldap_ndelay_on: 4
    ldap_is_sock_ready: 4
    ldap_ndelay_off: 4
    ldap_open_defconn: successful
    ldap_send_server_request
    ber_flush: 49 bytes to sd 4
      0000:  30 2f 02 01 01 60 2a 02  01 03 04 23 63 6e 3d 4d   0/...`*....#cn=M
      0010:  61 6e 61 67 65 72 2c 6f  3d 63 6f 66 72 61 6d 69   anager,o=toto
      0020:  2d 74 6f 75 6c 6f 75 73  65 2c 63 3d 63 6f 6d 80   toto,c=com.
      0030:  00                                                 .
    ldap_write: want=49, written=49
      0000:  30 2f 02 01 01 60 2a 02  01 03 04 23 63 6e 3d 4d   0/...`*....#cn=M
      0010:  61 6e 61 67 65 72 2c 6f  3d 63 6f 66 72 61 6d 69   anager,o=toto
      0020:  2d 74 6f 75 6c 6f 75 73  65 2c 63 3d 63 6f 6d 80   toto,c=com.
      0030:  00                                                 .
    ldap_result msgid 1
    ldap_chkResponseList for msgid=1, all=1
    ldap_chkResponseList returns NULL
    wait4msg (infinite timeout), msgid 1
    wait4msg continue, msgid 1, all 1
    ** Connections:
    * host: localhost  port: 389  (default)
      refcnt: 2  status: Connected
      last used: Wed Oct 19 12:47:40 2005
     
    ** Outstanding Requests:
     * msgid 1,  origid 1, status InProgress
       outstanding referrals 0, parent count 0
    ** Response Queue:
       Empty
    ldap_chkResponseList for msgid=1, all=1
    ldap_chkResponseList returns NULL
    ldap_int_select
    read1msg: msgid 1, all 1
    ber_get_next
    ldap_read: want=8, got=8
      0000:  30 41 02 01 01 61 3c 0a                            0A...a<.
    ldap_read: want=59, got=59
      0000:  01 35 04 00 04 35 75 6e  61 75 74 68 65 6e 74 69   .5...5unauthenti
      0010:  63 61 74 65 64 20 62 69  6e 64 20 28 44 4e 20 77   cated bind (DN w
      0020:  69 74 68 20 6e 6f 20 70  61 73 73 77 6f 72 64 29   ith no password)
      0030:  20 64 69 73 61 6c 6c 6f  77 65 64                   disallowed
    ber_get_next: tag 0x30 len 65 contents:
    ber_dump: buf=0x08e324b0 ptr=0x08e324b0 end=0x08e324f1 len=65
      0000:  02 01 01 61 3c 0a 01 35  04 00 04 35 75 6e 61 75   ...a<..5...5unau
      0010:  74 68 65 6e 74 69 63 61  74 65 64 20 62 69 6e 64   thenticated bind
      0020:  20 28 44 4e 20 77 69 74  68 20 6e 6f 20 70 61 73    (DN with no pas
      0030:  73 77 6f 72 64 29 20 64  69 73 61 6c 6c 6f 77 65   sword) disallowe
      0040:  64                                                 d
    ldap_read: message type bind msgid 1, original id 1
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x08e324b0 ptr=0x08e324b3 end=0x08e324f1 len=62
      0000:  61 3c 0a 01 35 04 00 04  35 75 6e 61 75 74 68 65   a<..5...5unauthe
      0010:  6e 74 69 63 61 74 65 64  20 62 69 6e 64 20 28 44   nticated bind (D
      0020:  4e 20 77 69 74 68 20 6e  6f 20 70 61 73 73 77 6f   N with no passwo
      0030:  72 64 29 20 64 69 73 61  6c 6c 6f 77 65 64         rd) disallowed
    read1msg:  0 new referrals
    read1msg:  mark request completed, id = 1
    request 1 done
    res_errno: 0, res_error: <>, res_matched: <>
    ldap_free_request (origid 1, msgid 1)
    ldap_free_connection
    ldap_free_connection: refcnt 1
    ldap_parse_result
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x08e324b0 ptr=0x08e324b3 end=0x08e324f1 len=62
      0000:  61 3c 0a 01 35 04 00 04  35 75 6e 61 75 74 68 65   a<..5...5unauthe
      0010:  6e 74 69 63 61 74 65 64  20 62 69 6e 64 20 28 44   nticated bind (D
      0020:  4e 20 77 69 74 68 20 6e  6f 20 70 61 73 73 77 6f   N with no passwo
      0030:  72 64 29 20 64 69 73 61  6c 6c 6f 77 65 64         rd) disallowed
    ber_scanf fmt (}) ber:
    ber_dump: buf=0x08e324b0 ptr=0x08e324f1 end=0x08e324f1 len=0
     
    ldap_msgfree
    ldap_perror
    ldap_bind: Server is unwilling to perform (53)
            additional info: unauthenticated bind (DN with no password) disallowed
    amicalement,
    Oligig

  12. #12
    Expert éminent sénior

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Points : 17 778
    Points
    17 778
    Par défaut
    Ce coup-ci il te manque l'option -W pour qu'il te demande ton mot de passe !!!


    Amicalement, Julp

  13. #13
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut
    ah oui ! Quel étourdi !
    Ca avance peut-être, j'ai un autre message d'erreur :
    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
    # ldapadd -v -D 'cn=Manager,o=toto,c=com' -h localhost -x -W -d -1 -f dit.ldif
    ldap_initialize( ldap://localhost )
    ldap_create
    ldap_url_parse_ext(ldap://localhost)
    Enter LDAP Password:
    ldap_bind_s
    ldap_simple_bind_s
    ldap_sasl_bind_s
    ldap_sasl_bind
    ldap_send_initial_request
    ldap_new_connection
    ldap_int_open_connection
    ldap_connect_to_host: TCP localhost:389
    ldap_new_socket: 4
    ldap_prepare_socket: 4
    ldap_connect_to_host: Trying 127.0.0.1:389
    ldap_connect_timeout: fd: 4 tm: -1 async: 0
    ldap_ndelay_on: 4
    ldap_is_sock_ready: 4
    ldap_ndelay_off: 4
    ldap_open_defconn: successful
    ldap_send_server_request
    ber_flush: 56 bytes to sd 4
      0000:  30 36 02 01 01 60 31 02  01 03 04 23 63 6e 3d 4d   06...`1....#cn=M
      0010:  61 6e 61 67 65 72 2c 6f  3d 63 6f 66 72 61 6d 69   anager,o=toto
      0020:  2d 74 6f 75 6c 6f 75 73  65 2c 63 3d 63 6f 6d 80   toto,c=com.
      0030:  07 63 6f 66 72 61 6d 69                            .toto
    ldap_write: want=56, written=56
      0000:  30 36 02 01 01 60 31 02  01 03 04 23 63 6e 3d 4d   06...`1....#cn=M
      0010:  61 6e 61 67 65 72 2c 6f  3d 63 6f 66 72 61 6d 69   anager,o=toto
      0020:  2d 74 6f 75 6c 6f 75 73  65 2c 63 3d 63 6f 6d 80   toto,c=com.
      0030:  07 63 6f 66 72 61 6d 69                            .toto
    ldap_result msgid 1
    ldap_chkResponseList for msgid=1, all=1
    ldap_chkResponseList returns NULL
    wait4msg (infinite timeout), msgid 1
    wait4msg continue, msgid 1, all 1
    ** Connections:
    * host: localhost  port: 389  (default)
      refcnt: 2  status: Connected
      last used: Thu Oct 20 08:27:02 2005
     
    ** Outstanding Requests:
     * msgid 1,  origid 1, status InProgress
       outstanding referrals 0, parent count 0
    ** Response Queue:
       Empty
    ldap_chkResponseList for msgid=1, all=1
    ldap_chkResponseList returns NULL
    ldap_int_select
    read1msg: msgid 1, all 1
    ber_get_next
    ldap_read: want=8, got=8
      0000:  30 0c 02 01 01 61 07 0a                            0....a..
    ldap_read: want=6, got=6
      0000:  01 31 04 00 04 00                                  .1....
    ber_get_next: tag 0x30 len 12 contents:
    ber_dump: buf=0x09b84530 ptr=0x09b84530 end=0x09b8453c len=12
      0000:  02 01 01 61 07 0a 01 31  04 00 04 00               ...a...1....
    ldap_read: message type bind msgid 1, original id 1
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x09b84530 ptr=0x09b84533 end=0x09b8453c len=9
      0000:  61 07 0a 01 31 04 00 04  00                        a...1....
    read1msg:  0 new referrals
    read1msg:  mark request completed, id = 1
    request 1 done
    res_errno: 0, res_error: <>, res_matched: <>
    ldap_free_request (origid 1, msgid 1)
    ldap_free_connection
    ldap_free_connection: refcnt 1
    ldap_parse_result
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x09b84530 ptr=0x09b84533 end=0x09b8453c len=9
      0000:  61 07 0a 01 31 04 00 04  00                        a...1....
    ber_scanf fmt (}) ber:
    ber_dump: buf=0x09b84530 ptr=0x09b8453c end=0x09b8453c len=0
     
    ldap_msgfree
    ldap_perror
    ldap_bind: Invalid credentials (49)
    Amicalement,
    Oligig

  14. #14
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut
    j'ai réussi à commencer d'insérer des données !
    Mais pas trop non plus, juste l'organisation mais c'est un début.
    j'ai échangé de place le "c=com= et le "o=toto" dans la ligne de commande car c'était inversé dans mon fichier slapd.conf.
    Le résultat c'est que ça commence la création, bonne nouvelle, mais ça me fait rapidement une erreur:
    voici la version courte:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    # ldapadd -v -D 'cn=Manager,c=com,o=toto' -h localhost -x -W -f dit.ldif
    ldap_initialize( ldap://localhost )
    Enter LDAP Password:
    add objectclass:
            organization
    add o:
            toto
    adding new entry "o=toto"
    modify complete
    ldap_add: Server is unwilling to perform (53)
            additional info: no global superior knowledge
    et voici la version longue:
    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
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    # ldapadd -v -D 'cn=Manager,c=com,o=toto' -h localhost -x -W -d -1 -f dit.ldif
    ldap_initialize( ldap://localhost )
    ldap_create
    ldap_url_parse_ext(ldap://localhost)
    Enter LDAP Password:
    ldap_bind_s
    ldap_simple_bind_s
    ldap_sasl_bind_s
    ldap_sasl_bind
    ldap_send_initial_request
    ldap_new_connection
    ldap_int_open_connection
    ldap_connect_to_host: TCP localhost:389
    ldap_new_socket: 4
    ldap_prepare_socket: 4
    ldap_connect_to_host: Trying 127.0.0.1:389
    ldap_connect_timeout: fd: 4 tm: -1 async: 0
    ldap_ndelay_on: 4
    ldap_is_sock_ready: 4
    ldap_ndelay_off: 4
    ldap_open_defconn: successful
    ldap_send_server_request
    ber_flush: 56 bytes to sd 4
      0000:  30 36 02 01 01 60 31 02  01 03 04 23 63 6e 3d 4d   06...`1....#cn=M
      0010:  61 6e 61 67 65 72 2c 63  3d 63 6f 6d 2c 6f 3d 63   anager,c=com,o=
      0020:  6f 66 72 61 6d 69 2d 74  6f 75 6c 6f 75 73 65 80   toto.
      0030:  07 63 6f 66 72 61 6d 69                            .toto
    ldap_write: want=56, written=56
      0000:  30 36 02 01 01 60 31 02  01 03 04 23 63 6e 3d 4d   06...`1....#cn=M
      0010:  61 6e 61 67 65 72 2c 63  3d 63 6f 6d 2c 6f 3d 63   anager,c=com,o=
      0020:  6f 66 72 61 6d 69 2d 74  6f 75 6c 6f 75 73 65 80   toto.
      0030:  07 63 6f 66 72 61 6d 69                            .toto
    ldap_result msgid 1
    ldap_chkResponseList for msgid=1, all=1
    ldap_chkResponseList returns NULL
    wait4msg (infinite timeout), msgid 1
    wait4msg continue, msgid 1, all 1
    ** Connections:
    * host: localhost  port: 389  (default)
      refcnt: 2  status: Connected
      last used: Thu Oct 20 09:00:18 2005
     
    ** Outstanding Requests:
     * msgid 1,  origid 1, status InProgress
       outstanding referrals 0, parent count 0
    ** Response Queue:
       Empty
    ldap_chkResponseList for msgid=1, all=1
    ldap_chkResponseList returns NULL
    ldap_int_select
    read1msg: msgid 1, all 1
    ber_get_next
    ldap_read: want=8, got=8
      0000:  30 0c 02 01 01 61 07 0a                            0....a..
    ldap_read: want=6, got=6
      0000:  01 00 04 00 04 00                                  ......
    ber_get_next: tag 0x30 len 12 contents:
    ber_dump: buf=0x086d3530 ptr=0x086d3530 end=0x086d353c len=12
      0000:  02 01 01 61 07 0a 01 00  04 00 04 00               ...a........
    ldap_read: message type bind msgid 1, original id 1
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x086d3530 ptr=0x086d3533 end=0x086d353c len=9
      0000:  61 07 0a 01 00 04 00 04  00                        a........
    read1msg:  0 new referrals
    read1msg:  mark request completed, id = 1
    request 1 done
    res_errno: 0, res_error: <>, res_matched: <>
    ldap_free_request (origid 1, msgid 1)
    ldap_free_connection
    ldap_free_connection: refcnt 1
    ldap_parse_result
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x086d3530 ptr=0x086d3533 end=0x086d353c len=9
      0000:  61 07 0a 01 00 04 00 04  00                        a........
    ber_scanf fmt (}) ber:
    ber_dump: buf=0x086d3530 ptr=0x086d353c end=0x086d353c len=0
     
    ldap_msgfree
    add objectclass:
            organization
    add o:
            toto
    adding new entry "o=toto"
    ldap_add_ext
    ldap_send_initial_request
    ldap_send_server_request
    ber_flush: 67 bytes to sd 4
      0000:  30 41 02 01 02 68 3c 04  09 6f 3d 43 6f 66 72 61   0A...h<..o=toto
      0010:  6d 69 30 2f 30 1d 04 0b  6f 62 6a 65 63 74 63 6c   0/0...objectcl
      0020:  61 73 73 31 0e 04 0c 6f  72 67 61 6e 69 7a 61 74   ass1...organizat
      0030:  69 6f 6e 30 0e 04 01 6f  31 09 04 07 43 6f 66 72   ion0...o1...toto
      0040:  61 6d 69                                           
    ldap_write: want=67, written=67
      0000:  30 41 02 01 02 68 3c 04  09 6f 3d 43 6f 66 72 61   0A...h<..o=toto
      0010:  6d 69 30 2f 30 1d 04 0b  6f 62 6a 65 63 74 63 6c   mi0/0...objectcl
      0020:  61 73 73 31 0e 04 0c 6f  72 67 61 6e 69 7a 61 74   ass1...organizat
      0030:  69 6f 6e 30 0e 04 01 6f  31 09 04 07 43 6f 66 72   ion0...o1...toto
      0040:  61 6d 69                                           
    modify complete
    ldap_result msgid 2
    ldap_chkResponseList for msgid=2, all=1
    ldap_chkResponseList returns NULL
    wait4msg (infinite timeout), msgid 2
    wait4msg continue, msgid 2, all 1
    ** Connections:
    * host: localhost  port: 389  (default)
      refcnt: 2  status: Connected
      last used: Thu Oct 20 09:00:18 2005
     
    ** Outstanding Requests:
     * msgid 2,  origid 2, status InProgress
       outstanding referrals 0, parent count 0
    ** Response Queue:
       Empty
    ldap_chkResponseList for msgid=2, all=1
    ldap_chkResponseList returns NULL
    ldap_int_select
    read1msg: msgid 2, all 1
    ber_get_next
    ldap_read: want=8, got=8
      0000:  30 28 02 01 02 69 23 0a                            0(...i#.
    ldap_read: want=34, got=34
      0000:  01 35 04 00 04 1c 6e 6f  20 67 6c 6f 62 61 6c 20   .5....no global
      0010:  73 75 70 65 72 69 6f 72  20 6b 6e 6f 77 6c 65 64   superior knowled
      0020:  67 65                                              ge
    ber_get_next: tag 0x30 len 40 contents:
    ber_dump: buf=0x086d4b10 ptr=0x086d4b10 end=0x086d4b38 len=40
      0000:  02 01 02 69 23 0a 01 35  04 00 04 1c 6e 6f 20 67   ...i#..5....no g
      0010:  6c 6f 62 61 6c 20 73 75  70 65 72 69 6f 72 20 6b   lobal superior k
      0020:  6e 6f 77 6c 65 64 67 65                            nowledge
    ldap_read: message type add msgid 2, original id 2
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x086d4b10 ptr=0x086d4b13 end=0x086d4b38 len=37
      0000:  69 23 0a 01 35 04 00 04  1c 6e 6f 20 67 6c 6f 62   i#..5....no glob
      0010:  61 6c 20 73 75 70 65 72  69 6f 72 20 6b 6e 6f 77   al superior know
      0020:  6c 65 64 67 65                                     ledge
    read1msg:  0 new referrals
    read1msg:  mark request completed, id = 2
    request 2 done
    res_errno: 0, res_error: <>, res_matched: <>
    ldap_free_request (origid 2, msgid 2)
    ldap_free_connection
    ldap_free_connection: refcnt 1
    ldap_parse_result
    ber_scanf fmt ({iaa) ber:
    ber_dump: buf=0x086d4b10 ptr=0x086d4b13 end=0x086d4b38 len=37
      0000:  69 23 0a 01 35 04 00 04  1c 6e 6f 20 67 6c 6f 62   i#..5....no glob
      0010:  61 6c 20 73 75 70 65 72  69 6f 72 20 6b 6e 6f 77   al superior know
      0020:  6c 65 64 67 65                                     ledge
    ber_scanf fmt (}) ber:
    ber_dump: buf=0x086d4b10 ptr=0x086d4b38 end=0x086d4b38 len=0
     
    ldap_msgfree
    ldap_perror
    ldap_add: Server is unwilling to perform (53)
            additional info: no global superior knowledge
     
    ldap_free_connection
    ldap_send_unbind
    ber_flush: 7 bytes to sd 4
      0000:  30 05 02 01 03 42 00                               0....B.
    ldap_write: want=7, written=7
      0000:  30 05 02 01 03 42 00                               0....B.
    ldap_free_connection: actually freed
    Et mon fichier ldif, ressemble à ça:
    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
    #Racine de l'arbre (DIT)
    dn: o=toto
    objectclass: organization
    o: toto
     
    #Objet/branche personnes
    dn: ou=Personnes, o=toto
    objectclass: organizationalUnit
    ou: personnes
    description: Branche personnes (utilisateurs)
     
    #Objet/branche ressources
    dn: ou=Ressources, o=toto
    objectclass: organizationalUnit
    ou: Ressources
    description: Ressources de l'organisation
     
    #Sous branche de machines
    dn: ou=Machines, ou=Ressources, o=toto
    objectclass: organizationalUnit
    ou: Machines
    description: Les machines du reseau
     
    #Feuille de la sous branche de machines
    dn: cn=myrat, ou=Hosts, ou=Ressources, o=toto
    objectclass: device
    objectclass: ipHost
    cn: myrat
    ipHostNumber: x.x.x.x
    description: Poste info
     
    #Feuille de la branche de personnes
    dn: cn=user1, ou=Personnes, o=toto
    objectclass: account
    objectclass: posixAccount
    uid: user1
    userPassword: {crypt}X5/DBrWPOQQaI
    cn:user1
    sn: user1
    mail:user1@toto.com
    locality:Toulouse
    uidNumber: 500
    gidNumber: 500
    homeDirectory: "/home/user1"
    loginShell: /bin/bash
    amicalement,
    Oligig

  15. #15
    Expert éminent sénior

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Points : 17 778
    Points
    17 778
    Par défaut
    D'après ton fichier LDIF tu souhaites utiliser comme racine o=toto (juste cela). Or cela correspond-il au contenu de ton fichier slapd.conf ? (En effet, le DN de ton LDAP manager nous laisse le penser).


    Cordialement, Julp

  16. #16
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut
    effectivement j'ai une difference, j'ai un "c=com" !
    Faut-il le rajouter à chaque fois dans mon fichier ldif ?
    voici mon slapd.conf:
    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
    include		/etc/openldap/schema/core.schema
    include		/etc/openldap/schema/cosine.schema
    include		/etc/openldap/schema/inetorgperson.schema
    include		/etc/openldap/schema/nis.schema
     
    pidfile		/var/run/slapd.pid
    argsfile	/var/run/slapd.args
     
    #######################################################################
    # ldbm and/or bdb database definitions
    #######################################################################
     
    database	bdb
    suffix          "c=com,o=toto"
    rootdn          "cn=Manager,c=com,o=toto"
    rootpw <password>
     
    directory	/var/lib/ldap
     
    # Indices to maintain for this database
    index objectClass                       eq,pres
    index ou,cn,mail,surname,givenname      eq,pres,sub
    index uidNumber,gidNumber,loginShell    eq,pres
    index uid,memberUid                     eq,pres,sub
    index nisMapName,nisMapEntry            eq,pres,sub
    amicalement,
    Oligig

  17. #17
    Expert éminent sénior

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Points : 17 778
    Points
    17 778
    Par défaut
    Deux solutions avant d'aller plus loin :
    1. Soit tu supprimes toutes les données de ton annuaire et tu recrées correctement ta racine (puis les données) (pour la suppression, il suffit de supprimer les fichiers db avec une commande du style : rm -fr /var/db/openldap/*)
    ou
    2. Tu supprimes le c=com, partout dans ton slapd.conf

    Il faut être cohérent.


    Amicalement, Julp

  18. #18
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut
    ok je vais tout supprimer.
    Par contre, je n'ai pas de "/var/db/openldap" etmon "directory" est "/var/lib/ldap" dans mon slapd.conf. Il y a des fichiers "bdb" dedans, c'est bien cela que je peux supprimer ?

    Amicalement,
    Oligig

  19. #19
    Expert éminent sénior

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Points : 17 778
    Points
    17 778
    Par défaut
    Exact. Sinon au cas où, utilisez mv vers un répertoire de stockage temporaire plutôt que rm.


    Cordialement, Julp

  20. #20
    Membre actif
    Profil pro
    Inscrit en
    Mai 2003
    Messages
    322
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2003
    Messages : 322
    Points : 211
    Points
    211
    Par défaut
    ok, merci
    oui comme ça au cas où ... 8)

Discussions similaires

  1. Authentification LDAP avec Open LDAP
    Par saint-pere dans le forum Contribuez / Téléchargez Sources et Outils
    Réponses: 1
    Dernier message: 29/03/2012, 22h27
  2. Réponses: 4
    Dernier message: 05/04/2007, 16h07
  3. Demande d'information pour ajout d'API Java dans eclipse
    Par BernardT dans le forum Eclipse Java
    Réponses: 6
    Dernier message: 07/07/2005, 17h08
  4. script pour ajouter des utilisateurs postgres
    Par xopos dans le forum PostgreSQL
    Réponses: 6
    Dernier message: 16/08/2004, 10h49

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo