Hello everyone,
I'm trying to create a new user. It is disabled, but I managed to enable
him by setting his 'userAccountControl' to 544. I also want to change
his password which is an empty one by default. But I really cannot find
how to do this with Net::LDAP and PERL. I tried the following :
my $newentry = Net::LDAP::Entry->new;
my $dn="cn=cmoreno,ou=Users,ou=rahtest,dc=XXX,dc=XXX,dc=XXX";
$newentry->add('cn' => 'cmoreno');
$newentry->dn("$dn");
$newentry->add('displayName' => 'Chino Moreno');
$newentry->add('sn' => 'moreno');
$newentry->add('sAMAccountName' => 'cmoreno');
$newentry->add('mail' => '[EMAIL PROTECTED]');
$newentry->add('userPrincipalName' => 'cmoreno');
$newentry->add('givenName' => 'Chino');
$newentry->add('userPassword' => 'azerty-4-4);
$newentry->add('objectclass' => 'user');
my $mesg = $ldap->add($newentry);
$newentry->update($ldap);
Can anyone help me please?
Robert-Alexandre Hollinger