Solved

LookupAccountName & remote computer

Posted on 2011-03-13
3
592 Views
Last Modified: 2013-12-04
Hi,

Iam using LookupAccountName to get sid of remote machine. But i get GetLastError 5. access ERROR_ACCESS_DENIED. Iam testing this on home network without domains.

Iam also have tried this variants:
LookupAccountName(L"machine_name", L"machine_name\\login",...);
LookupAccountName(null, L"machine_name\\login",...);
LookupAccountName(null, L"machine_name",...);
0
Comment
Question by:lavitz
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 35122357
'In order fot that to work, you need to be logged on with an username/password combination that also exists on the remote computer - in other words, if you are signed on as "JohnDoe" with the password "TopSecret", the other machine also needs to have an account "JohnDoe" with the PW "TopSecret". BTW, the machine name needs to be prepended with two backslashes, i.e.

LookupAccountName(L"\\\\machine_name", L"machine_name\\JohnDoe",...);
0
 

Author Comment

by:lavitz
ID: 35132072
How function LookupAccountName knows that iam logged on remote computer?
And how to log on on remote computer?
0
 
LVL 86

Expert Comment

by:jkr
ID: 35142637
You don't need to, the NTLM subsystem will take care of that - yet the aforementioned precondition applies.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Query performance - SQL Server 20 85
How Does Quick Books store date / time? 3 109
mixing C++ & C# in Vis Studio 2013 7 239
Is AWS.RDS considered a part of "Big Data"? 4 133
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question