?
Solved

LookupAccountName & remote computer

Posted on 2011-03-13
3
Medium Priority
?
596 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

771 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