Solved

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

Posted on 2004-03-29
10
244 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 200 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 200 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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