[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2004-03-29
10
Medium Priority
?
261 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

649 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