Bonjour

Je cherche a créer des comptes AD avec un script Perl. Voici ce que j'ai fait :
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
use strict;
use Net::LDAP;
 
CreateNewUser();
 
sub CreateNewUser 
{
 
	my $ldap = Net::LDAP->new( "orme.sva-jeanroze.fr", port => 389, version => 3,raw => qr/(?i:^jpegPhoto|;binary)/);
	my $mesg = $ldap->bind ( "cn=administrateur,cn=Users,DC=sva-jeanroze,dc=fr", password => "xxx" );
 
 
 my $result = $ldap->add( 'cn=Telephonie,dc=sva-jeanroze,dc=fr',
                        attr => [
                          'cn'   => 'essai',
                          'sn'   => 'essai',
						              'ipPhone' => '0030',
                          'unicodePwd'    => 'xxx',
                          'objectclass' => ['top', 'person','organizationalPerson','inetOrgPerson' ]]
                      );
 
 $result->code && warn "failed to add entry: ", $result->error ;
 
}
Et en retour, j'ai
failed to add entry: 00002071: UpdErr: DSID-030502F7, problem 6005 (ENTRY_EXISTS), data 0
e 522.
Pourtant, je n'ai pas de compte "essai" dans l'AD (ENTRY_EXISTS).

Avez-vous une idée sur l'erreur ?

Merci