Qmail-LDAP
[Top] [All Lists]

Re: qmail-ldap + ad

To: qmail-ldap@qmail-ldap.org
Subject: Re: qmail-ldap + ad
From: Claudio Jeker <jeker@n-r-g.com>
Date: Thu, 22 Feb 2007 13:22:10 +0100
Delivered-to: sp-com-lists@consult.net
Delivered-to: qmail-ldap-list@securepoint.com
Delivered-to: mailing list qmail-ldap@qmail-ldap.org
In-reply-to: <1172139380.5298.10.camel@lapccesario>
Mail-followup-to: Claudio Jeker <jeker@n-r-g.com>, qmail-ldap@qmail-ldap.org
Mailing-list: contact qmail-ldap-help@qmail-ldap.org; run by ezmlm
References: <1172139380.5298.10.camel@lapccesario>
User-agent: Mutt/1.5.12-2006-07-14
On Thu, Feb 22, 2007 at 08:16:20AM -0200, Carlos wrote:
> Hi peoples,
> 
> I working to enable "accountStatus" in qmail-dap + active directory.
> 
> Then I make any changes to test, but I think that I found one problem.
> 
> 
> In AD the filed that control user status is "userAccountControl".
> 
> When the account is enable the value is 512 when disable the value is
> 514.
> 
> see
> 
> Account enable:
> 
> # base <CN=Carlos Cesario,CN=Users,DC=tecnomega,DC=com,DC=br> with scope
> sub
> # filter: (objectclass=*)
> # requesting: ALL
> #
> 
> # Carlos Cesario, Users, tecnomega.com.br
> dn: CN=Carlos Cesario,CN=Users,DC=tecnomega,DC=com,DC=br
> ......
> distinguishedName: CN=Carlos Cesario,CN=Users,DC=tecnomega,DC=com,DC=br
> instanceType: 4
> whenCreated: 20070206142407.0Z
> whenChanged: 20070206190944.0Z
> displayName: Carlos Cesario
> uSNCreated: 13913
> uSNChanged: 16424
> name: Carlos Cesario
> objectGUID:: MAM/H0tcGE6/iZrQ0x1UyQ==
> userAccountControl: 512
> ......
> 
> 
> 
> Account Disable
> 
> # extended LDIF
> #
> # LDAPv3
> # base <CN=Pereira Souza,CN=Users,DC=tecnomega,DC=com,DC=br> with scope
> sub
> # filter: (objectclass=*)
> # requesting: ALL
> #
> 
> # pereira souza, Users, tecnomega.com.br
> dn: CN=pereira souza,CN=Users,DC=tecnomega,DC=com,DC=br
> ......
> distinguishedName: CN=pereira souza,CN=Users,DC=tecnomega,DC=com,DC=br
> instanceType: 4
> whenCreated: 20070214124917.0Z
> whenChanged: 20070221202000.0Z
> displayName: pereira souza
> uSNCreated: 20743
> uSNChanged: 28689
> name: pereira souza
> objectGUID:: hrPk6L4f4UWq9c4hebwGyA==
> userAccountControl: 514
> .......
> 
> 
> Then I change any values in qmail-ldap.h (to test)
> 
> #define LDAP_ISACTIVE           "userAccountControl"
> #define STATUS_BOUNCE           514
> #define STATUS_OK               512
> 

You don't need to modify the STATUS_BOUNCE  and STATUS_OK defines. Instead
you should change
ISACTIVE_BOUNCE and ISACTIVE_ACTIVE to something like:
#define ISACTIVE_BOUNCE         "514"
#define ISACTIVE_ACTIVE         "512"

The STATUS_* are internally used whereas the ISACTIVE_* definitions define
the expected strings for the different states.

-- 
:wq Claudio

<Prev in Thread] Current Thread [Next in Thread>