Solved

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

Posted on 2004-03-29
10
242 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
  • 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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