Monday, December 28, 2009

Groupwise Authentication to LDAP (Including Active Directory)

We recently wrote a utility using the Groupwise Administrative Object API to programmatically populate the LDAP Authentication field. This field is what is necessary to authenticate to LDAP services instead of relying on Groupwise authentication. Here is the jist of how it went down:

Obtain list of users in Groupwise
Ensure Groupwise users indeed had Active Directory Accounts
Use Powershell script to obtain "DistinguishedName" attribute from all users
Use utility written in C# to access the Groupwise Administrative Object API to loop through each user and post office and fill in their associated DistinguishedName into LDAP Authentication
Enable Post Office for LDAP. This meant placing our LDAP certificate in the SEARCH PATH (not the agent install directory as described in the documentation) in SYS:\SYSTEM for Netware and C:\windows\system32 for Windows.

Links:

Novell Official Documentation on LDAP Authentication for Groupwise 7 (Applicable to many recent versions)
Novell Administrative Object API Doc reference (See User.LDAPAuthentication. Says it requires Groupwise 7 SP3 or later)


3 comments:

GWGuruMan said...

Could you post the GroupWise utility you wrote to populate the LDAP Authentication field so we can use it?

Thanks.

Mevious said...

I'll see what I can find! We migrated from GroupWise last year so it may be gone...If not I can whip something up.

Mevious said...

After looking around it looks like I already posted what you need to set/modify properties.

Use
http://developer.novell.com/documentation/gwadmin/gwadmenu/index.html?page=/documentation/gwadmin/gwadmenu/data/bktitle.html
along with

http://unnetwork.blogspot.com/2009/12/sample-application-using-groupwise.html

Essentially, you want to connect to the groupwise domain (the AdminTypeLibrary.System GWSystem part)

create an instance of User3
AdminTypeLibrary.User3 user3User = (AdminTypeLibrary.User3)po.Users.Item(owner, po, domain);

set the LDAPAuthentication property

user3User.LDAPAuthentication="your object DN";
then
user3User.Commit();