468,765 Members | 1,518 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

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 2587

"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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by cksanjose | last post: by
reply views Thread by Wasco | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.