[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

LookupAccountName & remote computer

Posted on 2011-03-13
3
Medium Priority
?
597 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure 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.…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

649 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