NameErr: DSID-03050C55, problem 2003 (BAD_ATT_SYNTAX) when adding group with nested group

Natxo Asenjo <[email protected]> Wed, 16 Dec 2015 10:31:31 +0100
Newsgroups gmane.comp.lang.perl.modules.ldap
Message-ID <CAHBEJzWdMSx4TgeEvbRps8-5kswFfCcUTLa+cNMpBY0Fn3Npmg@mail.gmail.com>
--089e0118271e4b2c2605270092a4
Content-Type: text/plain; charset=UTF-8

hi,

creating a group with nested groups in it fails with error

NameErr: DSID-03050C55, problem 2003 (BAD_ATT_SYNTAX), data 0, best match
of:

in ldap AD 2008r2

This is the code:

my $nested_group = "HRM - Management";
my $dn = "cn=$nested_group,$test_base";

my @groups = (
    "cn=hrm - management - mt,$test_base",
    "cn=hrm - management - directie,$test_base"
);

my $result = $ldaptest->add(
    "$dn",
    attrs => [
        'objectclass'    => [qw/top group/],
        'cn'             => "cn=$nested_group",
        'samAccountName' => "$nested_group",
        'grouptype'      => 0x80000002,
        'member'         => [@groups],
    ]
);

$result->code && warn "failed to add group $dn ", $result->error;

Adding users is no problem. Do you know what I'm doing wrong?

Thanks!

--
Groeten,
natxo

--089e0118271e4b2c2605270092a4
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>hi,<br><br></div>creating a group with nested groups =
in it fails with error <br><br clear=3D"all"><div><div><div>NameErr: DSID-0=
3050C55, problem 2003 (BAD_ATT_SYNTAX), data 0, best match of:<br><br></div=
><div>in ldap AD 2008r2<br></div><div><br>This is the code:<br><br>my $nest=
ed_group =3D &quot;HRM - Management&quot;;<br>my $dn =3D &quot;cn=3D$nested=
_group,$test_base&quot;;<br><br>my @groups =3D (<br>=C2=A0=C2=A0=C2=A0 &quo=
t;cn=3Dhrm - management - mt,$test_base&quot;,<br>=C2=A0=C2=A0=C2=A0 &quot;=
cn=3Dhrm - management - directie,$test_base&quot;<br>);<br><br>my $result =
=3D $ldaptest-&gt;add(<br>=C2=A0=C2=A0=C2=A0 &quot;$dn&quot;,<br>=C2=A0=C2=
=A0=C2=A0 attrs =3D&gt; [<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &#3=
9;objectclass&#39;=C2=A0=C2=A0=C2=A0 =3D&gt; [qw/top group/],<br>=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &#39;cn&#39;=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D&gt; &quot;cn=3D$nested_gr=
oup&quot;,<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &#39;samAccountNam=
e&#39; =3D&gt; &quot;$nested_group&quot;,<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 &#39;grouptype&#39;=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D&gt; 0x80=
000002,<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &#39;member&#39;=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D&gt; [@groups],<br>=C2=A0=
=C2=A0=C2=A0 ]<br>);<br><br>$result-&gt;code &amp;&amp; warn &quot;failed t=
o add group $dn &quot;, $result-&gt;error;<br><br></div><div>Adding users i=
s no problem. Do you know what I&#39;m doing wrong?<br><br></div><div>Thank=
s!<br></div><div><br></div><div><div class=3D"gmail_signature">--<br>Groete=
n,<br>natxo</div>
</div></div></div></div>

--089e0118271e4b2c2605270092a4--