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 [EMAIL PROTECTED] ...... mail: [EMAIL PROTECTED] mail: [EMAIL PROTECTED] userAccountControl: 512 => active ...... #qmail-ldaplookup -u [EMAIL PROTECTED] ..... mail: [EMAIL PROTECTED] mail: [EMAIL PROTECTED] userAccountControl: 514 => disabled ..... thank you! Carlos
