problem 5003 (WILL_NOT_PERFORM)

I

Iceberg

Hello!

I've got a little problem. I'm trying to add a user via Net::LDAP and
reciving this msg:

failed to add entry: 00002011: SvcErr: DSID-031A0FBC, problem 5003
(WILL_NOT_PERFORM), data 0

I've googled around and found some posts about permissions, but I'm
running as Domain-Admin. I've found out that the number "00002011" is a
more specific description of this problem, but I know no table were to
look at. Google gives me 0 hits.

Can somebody help me with an error table? Or has somebody had this
problem?

Thx
Iceberg
 
M

Marc Popp

Hello,

no answer yet, that's sadly. Here is a small sniplet:

sub Add_User {
my ($ID) = @_;
my $NewUser_DN = "CN=".$ma{$ID}{'Nachname'}.
'\, '.$ma{$ID}{'Vorname'}.",".$ou{$ma{$ID}{'OrgEinheit_ID'}}{'DN'};
my $NewUser_SAMAccountName = $ma{$ID}{'Login'};

print "Adding user:".$NewUser_DN;

my $NewUser = [
'description' => $NewUser_SAMAccountName,
'msSFU30UidNumber' => $ma{$ID}{'Personalnummer'},
'DisplayName' => $ma{$ID}{'Nachname'}.', '.$ma{$ID}{'Vorname'},
'sAMAccountName' => $NewUser_SAMAccountName,
'objectclass' => ['top', 'person', 'organizationalPerson', 'user']
'objectCategory' => 'user',
];

$result = $ldap->add( $NewUser_DN, attr => $NewUser );
$result->code && die "failed to add entry: ", $result->error ;
}

Here is the output:

Adding User: CN=Pab\, Tho,OU=[...]
failed to add entry: 00002011: SvcErr: DSID-031A0FBC, problem 5003
(WILL_NOT_PERFORM), data 0 at ./sync-aav-mitarbeiter.pl line 134.

Does somebody see an error??

Thx
Iceberg
 
A

Anno Siegel

Marc Popp said:
Hello,

no answer yet, that's sadly. Here is a small sniplet:

Not a a really helpful one, I'm afraid...
sub Add_User {
my ($ID) = @_;
my $NewUser_DN = "CN=".$ma{$ID}{'Nachname'}.
'\, '.$ma{$ID}{'Vorname'}.",".$ou{$ma{$ID}{'OrgEinheit_ID'}}{'DN'};
my $NewUser_SAMAccountName = $ma{$ID}{'Login'};

This is horribly written. Use string interpolation and make use of the
auto-quoting ability of {}. Use concatenation (.) only to bridge line
breaks when the string is too long. On the other hand, with structures
like yours, I'd explicitly write out the "->" even between "...}{...".
Also, add some white space. So (untested):

my $NewUser_DN = "CN= $ma{$ID}->{ Nachname}\\, $ma{$ID}->{ Vorname}, " .
"$ou{ $ma{$ID}->{ OrgEinheit_ID}}->{ DN}";
my $NewUser_SAMAccountName = $ma{ $ID}->{ Login};
print "Adding user:".$NewUser_DN;
^
No blank after the colon (see below).
my $NewUser = [
'description' => $NewUser_SAMAccountName,
'msSFU30UidNumber' => $ma{$ID}{'Personalnummer'},
'DisplayName' => $ma{$ID}{'Nachname'}.', '.$ma{$ID}{'Vorname'},
'sAMAccountName' => $NewUser_SAMAccountName,
'objectclass' => ['top', 'person', 'organizationalPerson', 'user']
'objectCategory' => 'user',
];

Similar objections. Too much quoting and concatenation, too little white
space.

More generally, why do you have to demonstrate the problem using
complicated data structures (which you don't show or explain)? Setting
the relevant variables directly

my $NewUser = ...;
my $NeUser_DN = ...;

should show exactly the same error with far less eye-strain for your
readers. Try that, and if the error remains, post again.
$result = $ldap->add( $NewUser_DN, attr => $NewUser );
$result->code && die "failed to add entry: ", $result->error ;
}

Here is the output:

Adding User: CN=Pab\, Tho,OU=[...]
^
Where is this blank coming from?
failed to add entry: 00002011: SvcErr: DSID-031A0FBC, problem 5003
(WILL_NOT_PERFORM), data 0 at ./sync-aav-mitarbeiter.pl line 134.

Does somebody see an error??

No, I don't see the error. But the output is not produced by your code
above, there is an unaccounted blank in the output. Please copy and
paste the *exact* code you used to produce the output.

Anno
 
M

Marc Popp

Hi Anno!

Thx very much for your help. I'm new to perl so got some nice ideas
from you post. thx for that.

About my problem. It seams that it is a problem with AD itself. I've
build a new tree and tested my script and it works.

Thx for that.
Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top