?
Solved

As I can determine, that the user A is included into group B?

Posted on 2004-03-29
10
Medium Priority
?
255 Views
Last Modified: 2010-04-05
I know, that there is NetUserGetGroups function.
But the situation is possible: user A -> group C -> group B.
Using NetUserGetGroups function I receive group C.
How to find out, to what groups the group C belongs?
0
Comment
Question by:EgorovAlex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
10 Comments
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10705250
EgorovAlex, a better description may entice someone to answer your question. Myself, i' haven't a clue what your asking.

<smile>

Shane
0
 
LVL 26

Accepted Solution

by:
Russell Libby earned 800 total points
ID: 10705954

Being that global groups can only contain users, and local groups can only contain users or global groups, I believe your setup is as follows (please correct if I am wrong).

user A - global group C - local group B

In order to find all the groups that C belongs to, you will need to perform a NetLocalGroupEnum to enumerate all the local groups on the server, then for each local group obtained, you will need to perform a NetLocalGroupGetMembers call in order to determine if the global group C exists in the local group.

If you require code for this example then just ask.

Regards,
Russell


0
 
LVL 11

Assisted Solution

by:shaneholmes
shaneholmes earned 800 total points
ID: 10706013
EgorovAlex,

Take a look at this set of free components:

http://www.wilsonc.demon.co.uk/delphi.htm

NT Specific Components


The TNetServer component allows you to connect to local or remote servers and  enumerate, add and delete users and groups.  It also allows you to find the primary domain controller (PDC) for a domain, list trusted domains, and force full and partial replications across the domain.

The TNetUser component allows you to examine and change the various properties for an NT user account.  It also allows you to add and remove users from global and local groups.

The TNetLocalGroup and TNetGlobalGroup component allows you to examine and change the various properties for NT groups.  It also allows you to add and remove users from the groups.
 
Shane
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:EgorovAlex
ID: 10706483
2 shaneholmes:
Thank you for link.

2 rllibby:
I have the following situation in my Active Directory (Win2003):
user A - global group C - global group B
0
 

Author Comment

by:EgorovAlex
ID: 13194992
Unfortunately I have not received the full answer to my question:
      
I have the following situation in my Active Directory (Win2003):
user A - global group C - global group B

How I can determine what the user A is included into group B?
0
 

Author Comment

by:EgorovAlex
ID: 13200187
Also i have SID's for user A and group B (if it can help)
0
 

Author Comment

by:EgorovAlex
ID: 14972412
Unfortunately I so have not received the answer as it is possible to determine, that the global group C is included into global group B
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question