Working with Users and Groups in the NT Accounts Database

Suppose the notifier runs on an NT-based intranet, all the subscribers are listed in the NT domain’s Security Accounts Manager (SAM) directory, and the FullName slot of each user’s directory entry includes an email address as well as a first and last name. In this situation it makes sense to define the group of subscribers using NT’sUser Manager and then let the notifier consult the NT directory in order to enumerate subscribers and fetch their email addresses.

As usual there’s more than one way to do it. You can manipulate the necessary Win32 APIs from a number of scripting languages, including Visual Basic, Python, and Perl. Hooking directly into the low-level Win32 APIs used to query the directory is, however, a wholly NT-centric approach. What if you’d also like to be able to work with a Novell NDS directory or an LDAP directory? Happily Microsoft has provided Active Directory Services Interface (ADSI), a component that works with all three of these directories—and potentially others as well. ADSI will be included as a standard component of Windows 2000. Until then, it’s (freely) available separately at http://www.microsoft.com/windows/server/Technical/directory/adsilinks.asp .

ADSI works on the ODBC model. It’s a driver manager that provides a generalized interface to data sources—in this case, directories—and that accepts pluggable drivers that adapt it to a range of specific data sources. As its name implies, ADSI’s ...

Get Practical Internet Groupware now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.