Hello everybody,
im trying hard to automate some tasks in a huge windows environment.
This lend me to bigger problems while trying to create new global
security groups within active directory. First I tried to add the groups
as discribed in article "Creating Groups" at Platform SDK:
System.Director yServices documentation. I figuerd out that something in
the article was missing, because groupcreation ended in an error: "A
constraint violation occured." The missing thing was to set the property
for "sAMAccountName ". Now a new error occures wich bothers me: "A device
attached to the system is not functioning."
Anyone encountered similar problems or - even better- anyone solved this
problem?
Here a small codesnipplet for problemtracing. ..
----- snip ----------------------------------------------------------
public int createOuTree( ArrayList toAdd )
{
int returnValue = 0;
DirectoryEntrie s adsRoot = pubAds.Children ;
DirectoryEntry newOu;
DirectoryEntry newSubOu;
DirectoryEntry genGrp;
foreach ( string addOu in toAdd )
{
try
{
newOu = adsRoot.Add("OU =" + addOu, "organizational Unit");
newOu.CommitCha nges();
}
catch( COMException e )
{
returnValue = 1;
exception = e.Message.ToStr ing();
continue;
}
DirectoryEntrie s genChildOus = newOu.Children;
foreach ( string subOu in schemaDef )
{
try
{
newSubOu = genChildOus.Add ( "OU=" + subOu, "organizational Unit" );
newSubOu.Commit Changes();
Console.WriteLi ne( "\t|- {0} (subou)", subOu );
if ( subOu == schemaGroupentr iesPrefixes[0] )
{
int i = 1;
while ( i < schemaGroupentr iesPrefixes.Len gth )
{
string groupID = "CN=" + schemaGroupentr iesPrefixes[i] +
addOu.ToString( );
Console.WriteLi ne( "\t|\t|- {0} (securitygroup) ",
schemaGroupentr iesPrefixes[i] + addOu );
try
{
genGrp = newSubOu.Childr en.Add( groupID, "group" );
genGrp.Properti es["groupType"].Value =
ActiveDs.ADS_GR OUP_TYPE_ENUM.A DS_GROUP_TYPE_G LOBAL_GROUP |
ActiveDs.ADS_GR OUP_TYPE_ENUM.A DS_GROUP_TYPE_S ECURITY_ENABLED ;
genGrp.Properti es["sAMAccountName "].Value = groupID;
genGrp.Properti es["descriptio n"].Value = "Standard Group for OU "
+ addOu.ToString( );
genGrp.CommitCh anges();
i++;
}
catch ( Exception e )
{
Console.WriteLi ne( "Caught exception: \"{0}\", while adding group
{1}", e.Message, groupID );
i++;
continue;
}
}
}
}
catch( COMException e)
{
returnValue = 1;
exception = e.Message.ToStr ing();
continue;
}
}
}
genGrp = null;
newSubOu = null;
newOu = null;
adsRoot = null;
return returnValue;
}
---- snap ------------------------------------------------------
Best regards
Sergej Pioch 0 1531 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bryan Meyer |
last post by:
Hello Everyone:
I have a PHP script that attempts to create a temporary file to be used
during processing. The script is owned by my username (bryanrme) on
the server. When the script attempts to create the temporary file, I
get a "failed to open stream: Permission denied" error. The
permissions on my directory are set to 755. When I set the permissions
to 757, the creation of the file is successful. In this case, I notice
that the...
|
by: James Allan |
last post by:
Hello --
I'm trying to get SQL Server 2000 on a Windows 2000 Server to be able
to query an Active Directory. We've got two domain servers one Win2000
and one Win2003. However, I'm having problems:
I've run the following query to setup the linked server:
sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces',
'ADSDSOObject', 'adsdatasource'
|
by: drhowarddrfine |
last post by:
I'm working on a web site that could use some control using js but am
concerned about what problems I may have with potential users having
their js turned off. Has anyone had any serious problems with this
sort of thing? I know some of these potential users are with big
companies and am wondering if anyone had real problems with that.
|
by: Jaydeep |
last post by:
Hi,
Anybody knows how to create virtual directory programmatically under root
directory ofcourse from code-behind.
I am developing web-based application where I need to create a folder and
making this folder as virtual directory in IIS.
I know in ASP how to do it.
Set objIIS = GetObject("IIS://localhost/W3SVC/1/Root")
objIIS.Create("IISWebVirtualDir", strVirtualDirectoryName)
|
by: James |
last post by:
I have a VB windows forms application that accesses a Microsoft Access
database that has been secured using user-level security. The
application is being deployed using No-Touch deployment. The objective
in utilizing this new deployment method is to reduce the maintenance
overhead as well as making it easier for my users to setup and run the
application initially. I have VS 2002, Windows XP, Access XP(2000
format).
He is my problem....
| |
by: Adam Witney |
last post by:
Forwarding to the mailing list, as I don't know how to fix it....
------ Forwarded Message
From: Henning Klein <kleinh@rz.uni-potsdam.de>
Date: Tue, 22 Jun 2004 22:09:08 +0200
To: awitney@sghms.ac.uk
Subject: problems with installing postgres
hi,
|
by: BARTKO, Zoltán |
last post by:
Hello, folks,
I am trying to install pgsql8 on winxp. I tried first to install "as
is" with pginstaller beta2-dev3, no luck, it froze, switched off
Nod32, froze a little later, ran through the list of services,
switched off anything that seemed to be a firewall, no luck.
So I compiled beta3 with mingw, installed, and now initdb keeps
telling me this:
|
by: David Thielen |
last post by:
Hi;
My ASP.NET app (C# calling J# under .net 2.0) creates a png file in a
subdirectory to display as part of the created page. However, the bitmap will
not display due to a security violation.
Everything is the default settings I believe. IIS is running under Local
System. In IIS the DefaultAppPool is running under Network Service.
Annonymous access uses the account IUSR_JASMINE (machine name is Jasmine).
|
by: pamelafluente |
last post by:
I am still working with no success on that client/server
problem. I need your help. I will submit simplified versions
of my problem so we can see clearly what is going on.
My model:
A client uses IE to talk with a server.
The user on the client (IE) sees an ASP net page containing
a TextBox. He can write some text in this text box and
push a submit button.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |