Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Global Group Info in Domain Local Group AD Query Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
xenophon - 10 Jan 2006 00:05 GMT
I am enumerating a Domain Local Group. It contains local users as well
as Global Groups from other domains. When checking membership of the
group, I get a DirectoryEntry with the following Path property:

"LDAP://testdc.test.coml/CN=S-1-5-21-1973115903-1958036494-624655392-6671,CN=ForeignSecurityPrincipals,DC=test,DC=com"

I know that is a remote domain Global Group, but I need to get more
information on it so I can query that other domain and group. How can
I do that? I need to get the remote domain name and group name.
"Peter Huang" [MSFT] - 10 Jan 2006 05:07 GMT
Dear Customer,

From you description, I understand that you want to get a DirectoryEntry's
domain name and its group name.
If I misunderstood, please feel free to let me know.

Based on my research, we need to parse the Path property to get the domain
name and use the Name Property to get the group name.

Here is the code snippet for your reference.
       private void button1_Click(object sender, EventArgs e)
       {
    //You need to change the LDAP path according to your scenario.
           DirectoryEntry de = new
DirectoryEntry("LDAP://CN=Group1,DC=Test,DC=com");
           MessageBox.Show(de.Name);
           Regex rg = new Regex(@"DC=(\w+)");
           string dn="";
           foreach( Match m in rg.Matches(de.Path))
               dn += m.Groups[1].Value+".";
           MessageBox.Show(dn);
       }

You may have a try and let me know the result.
If you still have any concern, please feel free to let me know.
I look forward to hearing from you.

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

xenophon - 10 Jan 2006 14:53 GMT
You have misunderstood me completely. I do not need a Regular
Expression to
get the DC name. I know the DC name. I need to understand how to look
up
an entity in AD based on the GUID. In the below string:

"LDAP://testdc.test.coml/CN=S-1-5-21-1973115903-1958036494-624655392-6671,CN=ForeignSecurityPrincipals,DC=test,DC=com"

I need to know what "CN=S-1-5-21-1973115903-1958036494-624655392-6671"
is!

-----------------------------

Dear Customer,

From you description, I understand that you want to get a
DirectoryEntry's
domain name and its group name.
If I misunderstood, please feel free to let me know.
....
"Peter Huang" [MSFT] - 11 Jan 2006 08:40 GMT
Hi

I am not familar with AD.
Based on my understanding, you have tried to use Name property and you will
get a string like "S-1-5-21-1973115903-1958036494-624655392-6671" i
However based on my knowledge, the reason why we will get a Name of the
pattern of "S-1-5-21-1973115903-1958036494-624655392-6671" is because the
DNS, AD replication or name parse is not working correctly between the
Domains.

So I think you need to contact your AD administrator to check the DNS AD
configuration.
Or you may try to post in the AD newsgroup about how to well configurate
the AD.
e.g.
microsoft.public.win2000.active_directory
or
microsoft.public.windows.server.active_directory
Thanks for your understanding!
If you still have any other concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.