B
buurdb
Hi!
I can successfully add users with java/ldap into our Active Directory
2003. The problem is that all users I create get a mail-account witch
they should not.
I use the following settings but apparently there is something I have
to do to stop Active Directory to not create the Exchange mailbox for
the user. What do I do wrong?
Attributes attrs = new BasicAttributes(true);
attrs.put("objectClass","user");
attrs.put("samAccountName",cuid);
attrs.put("cn",cuid);
attrs.put("displayName",userName);
attrs.put("userPrincipalName", userName);
attrs.put("mailnickname", userName);
//some useful constants from lmaccess.h
int UF_ACCOUNTDISABLE = 0x0002;
int UF_PASSWD_NOTREQD = 0x0020;
int UF_PASSWD_CANT_CHANGE = 0x0040;
int UF_NORMAL_ACCOUNT = 0x0200;
int UF_DONT_EXPIRE_PASSWD = 0x10000;
int UF_PASSWORD_EXPIRED = 0x800000;
attrs.put("userAccountControl",Integer.toString(UF_NORMAL_ACCOUNT +
UF_PASSWD_NOTREQD + UF_PASSWORD_EXPIRED+ UF_ACCOUNTDISABLE));
Best regards
Roland
I can successfully add users with java/ldap into our Active Directory
2003. The problem is that all users I create get a mail-account witch
they should not.
I use the following settings but apparently there is something I have
to do to stop Active Directory to not create the Exchange mailbox for
the user. What do I do wrong?
Attributes attrs = new BasicAttributes(true);
attrs.put("objectClass","user");
attrs.put("samAccountName",cuid);
attrs.put("cn",cuid);
attrs.put("displayName",userName);
attrs.put("userPrincipalName", userName);
attrs.put("mailnickname", userName);
//some useful constants from lmaccess.h
int UF_ACCOUNTDISABLE = 0x0002;
int UF_PASSWD_NOTREQD = 0x0020;
int UF_PASSWD_CANT_CHANGE = 0x0040;
int UF_NORMAL_ACCOUNT = 0x0200;
int UF_DONT_EXPIRE_PASSWD = 0x10000;
int UF_PASSWORD_EXPIRED = 0x800000;
attrs.put("userAccountControl",Integer.toString(UF_NORMAL_ACCOUNT +
UF_PASSWD_NOTREQD + UF_PASSWORD_EXPIRED+ UF_ACCOUNTDISABLE));
Best regards
Roland