Advertisement

08.04.2004 at 02:59PM PDT, ID: 21082695
[x]
Attachment Details

Trouble Retrieving Permissions information from Shares

Asked by Tanglin05 in Visual Basic Programming

Tags: duplicate, properties, trustee

I am currently tasked with writing a vb app that will allow an user to input a domain user account (such as "Domain Admins") and retrieve a list of all shares (from a predifined list of available network shares) that have that account.

Technique: First, I am using the IADsAccessControlList and IADsSecurityDescriptor to retrieve the IADsAccessControlEntry for each share in the list (thus giving me the Trustee and AccessMask). I then compare all of the trustees for each share against the search phrase and return a list of shares that have a matching trustee.

Problem: I am getting multiple (duplicate) trustees for a single share. For example, I'll use the following code:

Set sd = sdUtil.GetSecurityDescriptor(strPath, ADS_PATH_FILE, ADS_SD_FORMAT_IID)
Set dacl = sd.DiscretionaryAcl

Where strPath is a valid path to a network share (like "\\server\folder\"). I can browse out to this shared network folder and view the Properties > Security tab to see what trustees -should- be returned (like "Domain Admins", "Domain Users", etc.).

Then, for purposes of illustration, I run this code:

For Each obj In dacl
     Debug.Print obj.Trustee
Next

THIS PRODUCES THE PROBLEM > It will output multiple duplicate trustees, like "Domain Admins", "Domain Admins", "Domain Users", "Domain Users", etc. It only repeats a group a MAXIMUM of twice and it does NOT always duplicate a group.

Question: Why are these groups being output twice? Is there a better way to accomplish my app's goal?

This one has got me stumped so I hope some experts out there have some ideas. Thanks!Start Free Trial
[+][-]08.05.2004 at 01:37PM PDT, ID: 11730530

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.05.2004 at 01:39PM PDT, ID: 11730553

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.10.2004 at 01:17PM PDT, ID: 11767254

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.21.2004 at 05:10PM PDT, ID: 12376472

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10.21.2004 at 05:18PM PDT, ID: 12376534

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.11.2004 at 01:34PM PST, ID: 12559823

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11.11.2004 at 06:06PM PST, ID: 12561947

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.11.2004 at 06:08PM PST, ID: 12561956

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2004 at 11:48AM PST, ID: 12812433

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]12.17.2004 at 12:50AM PST, ID: 12848579

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Basic Programming
Tags: duplicate, properties, trustee
Sign Up Now!
Solution Provided By: modulo
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32