473,698 Members | 2,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need Help programmaticall y setting AD Permissions

Hey folks,
I am in desparate need of help to solve my problem.

I have written a service that examines a table in a database, and creates a
directory hierarchy based on data in the table. It then programmaticall y
grants and revokes privileges to groups on the different directories in the
hierarchy.

It creates the directories correctly, and on my XP development machine, it
assigns the privileges correctly.
When I deploy it to the target machine (Win 2k server), when I look at the
security in the directories, I get a message the that rights are out of
order. I have to manually go into explorer, look at securty and let it
reorder it for the privileges to work correctly.

I've used the knowledge base article (269159-How to use VB and ADsSecurity
to property order ACEs in and ACL) to write a reorder function.

The function, however, dies on the last line, calling the
SetSecurityDesc riptor method with an ArgumentExcepti on. The helpful message
was "The parameter is incorrect".

Has anyone done this on a 2k machine, found the error, and know how to
"correct" the parameter?

I've seen a few other people on the web have this problem, but I couldn't
find any answers.
Nov 21 '05 #1
2 1345
You could try psexec to run the session locally. Psexec is at this link
http://www.sysinternals.com/ntw2k/freeware/psexec.shtml

This is assuming you have a rights issue.
"Buddy Robbins" <bu***********@ rimrockgroup.co m> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Hey folks,
I am in desparate need of help to solve my problem.

I have written a service that examines a table in a database, and creates
a directory hierarchy based on data in the table. It then
programmaticall y grants and revokes privileges to groups on the different
directories in the hierarchy.

It creates the directories correctly, and on my XP development machine, it
assigns the privileges correctly.
When I deploy it to the target machine (Win 2k server), when I look at the
security in the directories, I get a message the that rights are out of
order. I have to manually go into explorer, look at securty and let it
reorder it for the privileges to work correctly.

I've used the knowledge base article (269159-How to use VB and ADsSecurity
to property order ACEs in and ACL) to write a reorder function.

The function, however, dies on the last line, calling the
SetSecurityDesc riptor method with an ArgumentExcepti on. The helpful
message was "The parameter is incorrect".

Has anyone done this on a 2k machine, found the error, and know how to
"correct" the parameter?

I've seen a few other people on the web have this problem, but I couldn't
find any answers.

Nov 21 '05 #2
You could try psexec to run the session locally. Psexec is at this link
http://www.sysinternals.com/ntw2k/freeware/psexec.shtml

This is assuming you have a rights issue.
"Buddy Robbins" <bu***********@ rimrockgroup.co m> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Hey folks,
I am in desparate need of help to solve my problem.

I have written a service that examines a table in a database, and creates
a directory hierarchy based on data in the table. It then
programmaticall y grants and revokes privileges to groups on the different
directories in the hierarchy.

It creates the directories correctly, and on my XP development machine, it
assigns the privileges correctly.
When I deploy it to the target machine (Win 2k server), when I look at the
security in the directories, I get a message the that rights are out of
order. I have to manually go into explorer, look at securty and let it
reorder it for the privileges to work correctly.

I've used the knowledge base article (269159-How to use VB and ADsSecurity
to property order ACEs in and ACL) to write a reorder function.

The function, however, dies on the last line, calling the
SetSecurityDesc riptor method with an ArgumentExcepti on. The helpful
message was "The parameter is incorrect".

Has anyone done this on a 2k machine, found the error, and know how to
"correct" the parameter?

I've seen a few other people on the web have this problem, but I couldn't
find any answers.

Nov 21 '05 #3

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

Similar topics

0
3312
by: John Dalberg | last post by:
How can I enable "list folder contents" ntfs permission only programmatically? The docs for cacls and xcalcs do not have an example to set this up without setting up the other read permissions. John Dalberg
1
2335
by: ARaman | last post by:
How do you retrieve a shared printer's permissions programmatically?Theprinter is a network printer.NetShareGetInfo seems to always return ERROR_ACCESS_DENIED over the network. Is there a solution for 9x as well as NT systems using the Windows SDK API? Thanks in advance.
0
7692
by: DJP | last post by:
Hi there I need to be able to programmatically set permissions on registry keys using VB / VBScript / VBA. So far I have had a look at doing this using the WScript.Shell object, API calls, and WMI but the only one of these that goes any where near registry permissions is WMI and that is only to get the permissions of a key (cannot set). I am also quite happy for the code to call an external program to perform the task but can't seem to...
4
2192
by: Jozef | last post by:
Hello, I'm trying to check for and add a field to a table to a back end database through code. The problem I've been faced with is changing permissions, because I have to use administer permissions to change the design, then remove the delete permissions when the design has been changed. I have to do it in code because there are several sites that need an automated update (as opposed to manually adding the field). The platform is...
1
1456
by: Codex Twin | last post by:
Hello folks Is it possible to add/remove Read Permissions (and any other NTFS permissions) to a folder programmatically via an ASP.NET page? Thanks.
0
1462
by: Ian Toltz | last post by:
I'm working on a program for creating user accounts. I'm having issues with setting the permissions. Here's an example: String homeDir = @"\\SERVER\directory\"+username; //Create the directory Directory.CreateDirectory(homeDir);
0
2173
by: RKT | last post by:
I have a DataGridView bound to an MS Access table. This is a single- user application. When the User is adding or editing a row, the User may click on a Control elsewhere. That Control has context which I use to programmatically set *other* r/o cell values for the currently selected grid row. So, after that click on another control, and stuffing the related cell values, I want to seamlessly allow the user to resume editing/adding that row...
5
2166
by: daokfella | last post by:
I have a custom web.config section similar to the following: <CustomAuthSettings attr1="" attr2=""> <Locations RedirectUrl="Invalid.aspx"> <add Path="test.aspx" Roles="1,2,3" Permissions="4,5,6" /> </Locations> </CustomAuthSettings> Everything seems to work just fine. When I have config files in nested folders, Attr1 and Attr2 of the CustomAuthSettings section correctly
0
2773
by: Arielle | last post by:
Mainly I'm looking for direction in regards to a requirement I've been given. In the basics I have a task list where the tasks are generated by a number of folks however instead of having to go back into each line item per item addded to the list to modify the permissions they want to be able to select the "Editors" of the line item directly from the add form. I've tried for the past few days to find ANYTHING in regards of programmatically...
0
8604
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,...
1
8895
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
8861
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...
1
6518
isladogs
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...
0
5860
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
4369
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
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
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
2
2330
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.