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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access