473,386 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 2763

"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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.