469,573 Members | 1,222 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

Reading users and user groups

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.

Nov 15 '05 #1
1 2324
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.

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

19 posts views Thread by Lionel B | last post: by
1 post views Thread by tangus via DotNetMonster.com | last post: by
2 posts views Thread by Jr. BTS dev! | last post: by
1 post views Thread by Erick Perez - Quadrian Enterprises, S.A. | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.