473,382 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Impersonation of local account on remote machine

Hi all

I have one machine (A) which is not on a domain. There is an local user
account on A (userA) that has access to a certain folder. I have another
machine (B). An application on B initialises a FileSystemWatcher to watch
the previously mentioned folder on A.

My question is: how do I ensure that the FileSystemWatcher is operating
under the local account userA on machine A? I've explored LogonUser(...),
but this appears to only work either on the local machine, or if the account
to be impersonated is on a domain.

Any pointers gratefully received.

Cheers!

--
Chris
Jun 22 '07 #1
2 2081
Hi Chris,

From your description, you have two machines in a non-domain local
intranet. And you will use FileSystemWatcher to monitor folders from one
machine to another one and want to ensure the watcher will act like a local
user account(permission) on the remote machine, correct?

As for this scenario, I think you can use the "duplicated account" feature
of windows NTLM authentication. Suppose you haven't domain environment, you
can still make two windows machines share local accounts when the program
on each machine visit the another(remotely) through the following means:

** create two duplicated accounts (with identical username/password) on the
two machines(A and B)

** Then, you can run program on A with the MACHINEA\DuplicatedAccount and
when it access remote resource on B(such as fileshare), it will be
authenticated and recognized as MACHINEB\DuplicatedAccount.

Here are two former threads where I've also mentioned this:

#Accessing file system Options
http://groups.google.com/group/micro.../browse_thread
/thread/2d5f4fba973a6005/d8b236435ac33fe1

#Permission Errors Options
http://groups.google.com/group/micro.../browse_thread
/thread/64074c1cda72390/e19bdd75c558c764

In addition, if you have interests ,you can also look up the "programming
windows security" book authored by Keith Brown for detailed information.

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 25 '07 #2
Hi Chris,

How are you doing on this issue or does the suggestion in my last reply
help you some? If there is still anything we can help, please don't
hesitate to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: CJ | last post by:
Hi anyone. Does anyone know of issues regarding impersonation in VB .NET with regards to accessing remote WMI information? I have a wrapper class which encapsulates various WMI calls, this...
4
by: Ulf | last post by:
Hi all, I run into some problems when trying to copy a file to a remote machine. I first create with WMI a share on the remote machine (works fine), then impersonate with admin rights and try...
12
by: Anil Krishnamurthy | last post by:
We have an ASP.NET application that uses COM objects through Interop. The web application requires access to network and database resources and hence, needs to impersonate a domain account. The...
2
by: Seth Darr | last post by:
OK I am at my wits end and I hope that someone can help me. I've got an ASP.NET web app that generates dynamic excel spreadsheets via COM. It does this work in a seperate subdirectory called...
26
by: andrew_webby at hotmail | last post by:
Hi Am having a problem with an app I wrote to test patch delivery. I contact a remote PC, and get it to run a patch which is installed on a server. It works fine if I use psexec for example and...
0
by: Mick | last post by:
Hi, I work for a large organization, and although I control the servers in my area, I do not have the ability to create or manage domain accounts. I can successfully impersonate a local account...
8
by: Ben Fidge | last post by:
Hi I have a small WinForms app that needs to copy files from a shared drive on a network. If I connect to the mapped drive using Explorer, a password dialog pops-up and I have to provide...
1
by: Rocky | last post by:
I have a problem. I have a webform, which uses impersonation. My iis is set to windows integrated authentication and anonymous is disabled. My webform connects to active directory and...
3
by: Ryan | last post by:
I have 2 machines on the same lan. Neither one is on a domain. Lets call them computer1 and computer2. Computer1 has a user/password called Computer1User /Computer1Password Using the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.