Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How Change Boolean Attribute LDAP

26 views
Skip to first unread message

Lars Reidelbach

unread,
May 31, 2012, 6:11:19 AM5/31/12
to perl...@perl.org
Hi,

I create User accounts in our LDAP. For this I must change the attribute
msDS-UserAccountDisabled from "TRUE" to "FALSE". This is a boolean
attribute with "False" and " True". I can't do this always error that the
user could not create. I had tryed "FALSE", "1" and "0". Nothing works. Can
anyone help how I change a boolean attribute.



$result = $ldap2->add( 'CN=TestUser,OU=Test,DC=Test',
attr => [
'cn' => 'TestUser',
'msDS-UserAccountDisabled' => 'FALSE',
'userPrincipalName' => 'TestUser',
'objectclass' => ['top', 'person',
'organizationalPerson',
'user' ],
]
);


best regards,
Lars

Peter Marschall

unread,
Jun 3, 2012, 12:27:09 PM6/3/12
to perl...@perl.org
Hi,

On Thursday, 31. May 2012, Lars Reidelbach wrote:
> I create User accounts in our LDAP. For this I must change the attribute
> msDS-UserAccountDisabled from "TRUE" to "FALSE". This is a boolean
> attribute with "False" and " True". I can't do this always error that the
> user could not create. I had tryed "FALSE", "1" and "0". Nothing works. Can
> anyone help how I change a boolean attribute.

general answer for those cases:
Check how the attribute in question looks in other user objects where it may
be set, and then use this value.

As a side note:
If I remember the RFC correctly, Boolen attributes are a bit special, as the
false value is given implicitly, i.e. by the absence of the attribute.
[might not apply to ADAM & Co - I've seen other LDAP servers that allowed
booeanAttribute=FALSE too]

Best
PEter
--
Peter Marschall
pe...@adpm.de
0 new messages