473,382 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 1674
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******@paracominc.com> wrote in message
news:Oc****************@newssvr25.news.prodigy.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
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 #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******@paracominc.com> wrote in message
news:Oc****************@newssvr25.news.prodigy.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
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 #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
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.


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
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...
4
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...
1
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...
3
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...
1
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...
0
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...
1
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...
2
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
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.