Re: Different credentials for remote registry/SCM access
- From: "Skywing [MVP]" <skywing_NO_SPAM_@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Oct 2006 13:57:06 -0400
Yes. Use LogonUser(..LOGON32_LOGON_NEW_CREDENTIALS..). This hands back a
token that has the same local identity but uses different default
credentials for network access.
This is the same trick that starting a program with `runas /netonly' will
do. If you just need for example a command prompt that you can start
RegEdit from, that will use different credentials for remote access, then
you should be able to use runas.exe without having to write any code.
--
Ken Johnson (Skywing)
Windows SDK MVP
http://www.nynaeve.net
"SteveS" <SteveSpencer@xxxxxxxxxxxxxxxxx> wrote in message
news:892DE149-1FD6-406D-8820-E7A9AC2C42C7@xxxxxxxxxxxxxxxx
Most of our users, not surprisingly, do not log on as users with Domain or
Local Administrator privileges. Occasionally, we have a need to stop and
restart a service remotely, or to reconfigure something like a DCOM
setting,
such as a remote machine name.
If the current user were logged in as either the remote machine
Administrator or a domain admit, there's no issue. We use custom written
EXEs
to do this, since it restricts the damage that can be done with REGEDIT or
SC
:)
Given that a user knows the name and password of a sufficiently privileged
account, is there a way to programmatically say 'use these credentials'
when
using RegConnectRegistry or OpenSCManager?
If possible, we don't want to use RUNAS to start the apps.
--
Steve S
.
- Prev by Date: CryptAcquireContext not working
- Next by Date: Re: LogOnUser with Smart Card Credentials
- Previous by thread: RE: Different credentials for remote registry/SCM access
- Next by thread: Re: NTFS and File Streams
- Index(es):
Relevant Pages
|