Windows Vista Forums
Vista Forums Home Join Vista Forums Tech Publications Windows 7 Forum Vista Tutorials Webcasts Tags

Welcome to Vista Forums we are your forum for Windows Vista help and discussion. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Vista Newsgroups > Vista security

Accessing registory remotely

Update your Vista Drivers
Reply
 
Thread Tools Display Modes
Old 02-17-2007   #1 (permalink)
rajendersaini@gmail.com
Guest


 

Accessing registory remotely

Hi

I have problem in accessing registory remoteley form one vista machine
to othe vista machine .

Here is code sip of my application

//
dwResult = WNetAddConnection2(&NetRes,
pCredential->m_szPassword.data(),
pCredential->m_szUserName.data(),
0);

if(dwResult == ERROR_SUCCESS)
{
dwResult = RegConnectRegistry(szMachineIP, rootkey,
&m_hRemRegKey);

if(dwResult == ERROR_SUCCESS)
dwResult = RegOpenKeyEx (m_hRemRegKey, pszSubkey, 0L, regFlg,
&m_hkeySubkey);

goto HANDLE_ERROR;
Everything goes fine till RegOpenKeyEx which return error code access
denied
I am passing credentail of a user who has administrator right on
machine for which i am trying to
access the registory whicle making connection .

Can anybody tell me ahow to move further ?

Rajender saini


My System SpecsSystem Spec
Old 02-17-2007   #2 (permalink)
Jesper
Guest


 

RE: Accessing registory remotely

I presume regFlg is KEY_ALL_ACCESS? Is the account you are connecting with a
local user or a domain user? If it is a local user then you get a filtered
token by default and your call will fail with ERROR_ACCESS_DENIED if you ask
for permissions that only administrators have.

By default only domain users who are members of the local administrators
group get a non-filtered token when connecting remotely. That means that you
cannot, by default, connect to a non-domain joined system as an administrator
using any of the SMB APIs.

There is a reg hack to change this, but it should only be used in situations
where you absolutely have to. This behavior blocks a number of interesting
attacks. Here is the key:
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system
Value: LocalAccountTokenFilterPolicy
Type: REG_DWORD
Data: 0 (default) – Build filtered token
1 – Build elevated token


"rajendersaini@gmail.com" wrote:

> Hi
>
> I have problem in accessing registory remoteley form one vista machine
> to othe vista machine .
>
> Here is code sip of my application
>
> //
> dwResult = WNetAddConnection2(&NetRes,
> pCredential->m_szPassword.data(),
> pCredential->m_szUserName.data(),
> 0);
>
> if(dwResult == ERROR_SUCCESS)
> {
> dwResult = RegConnectRegistry(szMachineIP, rootkey,
> &m_hRemRegKey);
>
> if(dwResult == ERROR_SUCCESS)
> dwResult = RegOpenKeyEx (m_hRemRegKey, pszSubkey, 0L, regFlg,
> &m_hkeySubkey);
>
> goto HANDLE_ERROR;
> Everything goes fine till RegOpenKeyEx which return error code access
> denied
> I am passing credentail of a user who has administrator right on
> machine for which i am trying to
> access the registory whicle making connection .
>
> Can anybody tell me ahow to move further ?
>
> Rajender saini
>
>

My System SpecsSystem Spec
Reply
Update your Vista Drivers

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
confused about remotely accessing email from windows mail Verso Vista mail 1 08-27-2008 11:00 AM
Can't connect remotely Don_M Vista networking & sharing 1 07-06-2008 02:12 PM
Remotely accessing Video and Music using Media Center Roderic Dohleman Vista music pictures video 0 05-13-2008 06:49 PM
Accessing Mail remotely Mike H Vista mail 1 03-01-2008 10:21 AM
connecting to a pc remotely... maya Vista General 3 08-01-2007 07:04 PM


Complimentary Industry Resources

Vista Forums has joined forces with TradePub.com to offer you a new, exciting, and entirely free professional resource. Visit http://vistax64.tradepub.com today to browse our selection of complimentary Industry magazines, white papers, webinars, podcasts, and more across 34 industry sectors. No credit cards, coupons, or promo codes required. Try it today!




Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51