473,662 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADSI adding a group to a group

I have a C# application in which I need to add one Active Directory group as
a member of another group. I have tried using the same steps that work for
adding a user to a group, but that isn't working. I'm just adding the
distinguished name of one group to the member property of another. Either
I'm missing something or there must be a better way. All suggestions
welcome.

Thanks!

Russ
Nov 17 '05 #1
4 1699
What's not working? Are you getting a "constraint violation" or "unwilling
to perform" error, or is something else wrong?

There are specific rules about what types of groups can be nested in other
groups. Additionally, you'll want to ensure that your AD domain is at least
in 2000 native mode (not mixed mode).

Joe K.

"Russ Ferrill" <rf******@parac ominc.com> wrote in message
news:Oc******** ********@newssv r25.news.prodig y.net...
I have a C# application in which I need to add one Active Directory group
as a member of another group. I have tried using the same steps that work
for adding a user to a group, but that isn't working. I'm just adding the
distinguishe d name of one group to the member property of another. Either
I'm missing something or there must be a better way. All suggestions
welcome.

Thanks!

Russ

Nov 17 '05 #2
What's not working? Are you getting a "constraint violation" or "unwilling
to perform" error, or is something else wrong?

There are specific rules about what types of groups can be nested in other
groups. Additionally, you'll want to ensure that your AD domain is at least
in 2000 native mode (not mixed mode).

Joe K.

"Russ Ferrill" <rf******@parac ominc.com> wrote in message
news:Oc******** ********@newssv r25.news.prodig y.net...
I have a C# application in which I need to add one Active Directory group
as a member of another group. I have tried using the same steps that work
for adding a user to a group, but that isn't working. I'm just adding the
distinguishe d name of one group to the member property of another. Either
I'm missing something or there must be a better way. All suggestions
welcome.

Thanks!

Russ

Nov 17 '05 #3
>I have a C# application in which I need to add one Active Directory group as
a member of another group. I have tried using the same steps that work for
adding a user to a group, but that isn't working. I'm just adding the
distinguishe d name of one group to the member property of another. Either
I'm missing something or there must be a better way. All suggestions
welcome.


SHOW US THE CODE !!

There are a number of things that commonly cause this to fail:

* your servers are not in native mode, e.g. you still have a mixed NT4
/ Win2K / Win2003 environment. Here, nesting groups will not work

* you are trying to nest groups which cannot be nested

* you misspelled the DN's of the groups

* you are using WinNT provider instead of LDAP

If none of those apply, we would definitely need to see your code (and
please give us all the variable VALUES, too!) in order to be able to
help

Marc
Nov 17 '05 #4
Thanks Joe and Marc!

The problem was the AD domain mode.
Thanks again!
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6985
by: Kevin Otte | last post by:
Hi everyone, I'm pretty new to using the COM functionality in PHP. I want to administer my PC using PHP together with ADSI. My first problem is to enumerate the groups in my domain. I tried using the following but it didn't work: $objDomain = new COM("WinNT://mydomain") or die("Cannot find domain"); $objDomain->filter = array("group"); foreach($objDomain as $group){
4
7370
by: Akhlaq Khan | last post by:
we are developing an intranet application (web based) which needs to detect the logged in user ID of the user hitting the website. the intranet is huge and based on win2k active directory (around 20-30 different domains) with 25K+ users. i dont want to use "NT challenge response" for this pupose. I am exploring ways using ADSI and WMI to query the Active directory by using the IP address in the incoming web request and trying to figure...
1
1410
by: powerranger | last post by:
I'm new with ADSI with .Net. I'm developing a windows application to get the NT group name based on the user id. The application installed successfully on the target computer (OS NT with the latest patch and DSclient). Here is the code: int idx = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString().IndexOf("\\"); string gusernm = System.Security.Principal.WindowsIdentity.GetCurrent().Name.Substring(idx + 1); //...
3
4003
by: Prasad Karunakaran | last post by:
I have the following C# code to enumerate the list of groups in a domain using ADSI. The problem is if the domain contains machine accounts ($) it get those accounts too. Can somebody help me here to filter out the machine accounts so that I get only the NT group objects. public ArrayList GetNTGroups() { DirectoryEntry ntDirectoryGroups = null;
1
2388
by: HridayNarayan Rai | last post by:
This is hriday, wants to create an asp.net web page using c#. I want the validation, account creation, account updation, and account deletion of my user should happen using the active directory services. I use DirectorySearcher Object which works only with LDAP provider. I want my web page to work for all types of Active Directory. Can some one tell me what all I have to use for this requirment? If posible let me know about coding part...
0
280
by: Russ Ferrill | last post by:
I have a C# application in which I need to add one Active Directory group as a member of another group. I have tried using the same steps that work for adding a user to a group, but that isn't working. I'm just adding the distinguished name of one group to the member property of another. Either I'm missing something or there must be a better way. All suggestions welcome. Thanks! Russ
1
2768
by: James Schuler | last post by:
I am trying to run a query in an ASP.NET application against Active Directory using a linked server (ADSI) in SQL Server 2000. The query runs without any problems in Query Analyzer: SELECT sAMAccountName FROM OPENQUERY ( ADSI,
2
2797
by: sal21 | last post by:
In asp classic no NET! Usign LDAP or ADSI i know: my server is server NT name of domain=dip name of group=my_group name of user=my_user
8
3124
by: John | last post by:
Hi, gurus, How can I implement the following feature in C#: Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ", group") For Each objMember In objGroup.Members WScript.Echo vbCrLf & " Name: " & objMember.Name Next
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8764
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8546
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5654
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.