Use the DirectoryServices namespace with the WinNT provider for NT4.0
domain, and LDAP for Win2K domain with Active Directory.
DirectoryEntry objDomain = new DirectoryEntry("WinNT://domain")
foreach(DirectoryEntry objChild in objDomain.Children) {
if(objChild.SchemaClassName == "user") {
// This is a user
}
}
Or something like that for NT 4.0 (not tested or compiled). For Win2K use
the LDAP://rootDSE to get the name of the domain naming context and use the
DirectorySearcher class to find all users.
Arild
"Bjorn Kristensen" <no****@yahoo.com> wrote in message
news:eB*************@TK2MSFTNGP12.phx.gbl...
Hi.
I'm trying to read all the users and user groups from the NT domain I'm
connected to.
I cnat't se how this should be done. Can anyone help me.
I'm basically trying to link my users to the domain user's! I'll keep
track of my applications
user rigts but with the NT Domain users..
Thanks
Bjorn.