472,977 Members | 1,913 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,977 software developers and data experts.

How to how to get the privilege of domain controller

Leo
Hi,
guys.
I want to use c# to get the privilege of a domain controller in a
non-DC machine as i have the user name and password of DC.
But i can't find any functions in MSDN.
Has anyone met the same problem?

regards
Leo.

Nov 16 '06 #1
4 2745

"Leo" <po*********@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
| Hi,
| guys.
| I want to use c# to get the privilege of a domain controller in a
| non-DC machine as i have the user name and password of DC.
| But i can't find any functions in MSDN.
| Has anyone met the same problem?
|
| regards
| Leo.
|

It is not clear to me what you mean with this, could you be more explicit
and tell us in a few words what you are trying to accomplish.

Willy.

Nov 16 '06 #2
Leo
Sorry. It's my fault.

For example, I have a domain with machine A, B and C.
A is the domain controller. It can access the info in B and C, like
files or registry, etc.
Now i want to write a program running in B.
The program needs to fetch the info from A and C.
This operation needs the privilege of domain controller, but i don't
know how to get it.
"Willy Denoyette [MVP] д
"
"Leo" <po*********@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
| Hi,
| guys.
| I want to use c# to get the privilege of a domain controller in a
| non-DC machine as i have the user name and password of DC.
| But i can't find any functions in MSDN.
| Has anyone met the same problem?
|
| regards
| Leo.
|

It is not clear to me what you mean with this, could you be more explicit
and tell us in a few words what you are trying to accomplish.

Willy.
Nov 17 '06 #3

"Leo" <po*********@gmail.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
Sorry. It's my fault.

For example, I have a domain with machine A, B and C.
A is the domain controller. It can access the info in B and C, like
files or registry, etc.
Now i want to write a program running in B.
The program needs to fetch the info from A and C.
This operation needs the privilege of domain controller, but i don't
know how to get it.

You don't seem to understand how domain membership works, do you? The domain
controller has no access to B and C, domain accounts may have access to B
and C, and this only when they are given access to resources on B or C.
This means that if you have a domain account with access privileges to B and
C, you need to logon into the domain using this domain account and run the
program. If you login usung a local account (say on B), you'll have to call
Win32 API 'LogonUser' using the domain credentials in order to obtain an
access token, and impersonate this token when accessing A or C's resources.
The framework doc's on MSDN have an example that illustrates this (search
for LogonUser).

Willy.
Nov 17 '06 #4
Leo
Thanks,Willy.
It's so kind of you.

"Willy Denoyette [MVP] д
"
"Leo" <po*********@gmail.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
Sorry. It's my fault.

For example, I have a domain with machine A, B and C.
A is the domain controller. It can access the info in B and C, like
files or registry, etc.
Now i want to write a program running in B.
The program needs to fetch the info from A and C.
This operation needs the privilege of domain controller, but i don't
know how to get it.

You don't seem to understand how domain membership works, do you? The domain
controller has no access to B and C, domain accounts may have access to B
and C, and this only when they are given access to resources on B or C.
This means that if you have a domain account with access privileges to B and
C, you need to logon into the domain using this domain account and run the
program. If you login usung a local account (say on B), you'll have to call
Win32 API 'LogonUser' using the domain credentials in order to obtain an
access token, and impersonate this token when accessing A or C's resources.
The framework doc's on MSDN have an example that illustrates this (search
for LogonUser).

Willy.
Nov 21 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Frank | last post by:
I have observed that a temporary loss of a domain controller can cause problems creating new ado connections between a client machine running ado and a separate sql server machine that are members...
1
by: SL | last post by:
How do I set up access to a file on a Windows Server 2003 Domain Controller that also has IIS? The file sits on another server. The Domain Controller / IIS server connects to this file through a...
1
by: cksanjose | last post by:
We have a web server that is hosting several ASP.Net-based websites (intranet). The server was promoted as a backup domain controller. After doing this, the websites are not working anymore....
0
by: bi89101 | last post by:
I'm trying to debug a C++ application on the local machine (not ASP.NET) which happens to be a domain controller. Administrators can debug, but domain users cannot. I have looked at the debugger...
0
by: Wasco | last post by:
Hi all, I have a little problem.. I need to create a class that perform: - retrieve all users whitin a domain in domain controller (domainName is input parameter) - verify if a user is whitin...
7
by: Parv | last post by:
I am impersoanting a user to an other domain. But while doing so i am getting A required privilege is not held by the client exception. I have tried with aal possible usernames and passwords...
1
by: Parv | last post by:
I am trying to impersonate user to some other system using userName,domainName,password in C#. My Code is working fine if i am working on Windows 2000 professional after assigning current user "Act...
3
by: rabselling | last post by:
Hello everyone, I have a domain where there in the network,140 computers working. When ever the new computer come and want to have network, i make a connection with the domain and i give every...
0
by: SandVich | last post by:
i had two servers with Windows2000 Advance server OS. One is main Domain Controller and second on is additional. A problem occurred in additional domain controller and ultimately i had to format...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.