Qmail-LDAP
[Top] [All Lists]

Re: qmail-ldap + ad

To: qmail-ldap@qmail-ldap.org
Subject: Re: qmail-ldap + ad
From: Carlos <ccesario@tecnomega.com.br>
Date: Thu, 22 Feb 2007 12:10:36 -0200
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: <20070222122210.GC12056@diehard.n-r-g.com>
Mailing-list: contact qmail-ldap-help@qmail-ldap.org; run by ezmlm
References: <1172139380.5298.10.camel@lapccesario> <20070222122210.GC12056@diehard.n-r-g.com>
Reply-to: ccesario@tecnomega.com.br
Em Qui, 2007-02-22 às 13:22 +0100, Claudio Jeker escreveu:
> 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.
> 

Hi Claudio,

Thank you, I changed

#define ISACTIVE_BOUNCE         "514"
#define ISACTIVE_ACTIVE         "512"

and any little chage in qmail-ldaplookup.c

and voi-la!

#qmail-ldaplookup -u ccesario@tecnomega.com.br
......
mail: ccesario@tecnomega.com.br
mail: ccesario@tecnomega.com.br
userAccountControl: 512  => active
......

#qmail-ldaplookup -u pereira@tecnomega.com.br
.....
mail: pereira@tecnomega.com.br
mail: pereira@tecnomega.com.br
userAccountControl: 514  => disabled
.....




thank you!

Carlos




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