Re: Running sysinternals PSPASSWD.exe from local system account



On Fri, 20 Oct 2006 11:05:55 +0200, Lucvdv <replace_name@xxxxxxxx> wrote:

Does anyone have an idea what the program could be missing that makes it
skip over eveything except the local computer?


I got a bit further, 3 different situations (all running under the local
system account):

-1-
Call LogonUser and impersonate, then use Diagnostics.Process.Start: the new
process can't access the network.
Its stdout and stderr can be captured:
newProc.WaitForExit()
Dim s1 As String = newProc.StandardOutput.ReadToEnd

-2-
Don't call LogonUser and do no impersonation, but specify username and
password in the StartupInfo you're passing to Diagnostics.Process.Start:
the new process can access the network, but you don't get anything back
from its stdout and stderr. .StandardOutput.ReadToEnd returns an empty
string.

-3-
Combine the two: call LogonUser and impersonate, *and* specify the same
username and password in StartupInfo. The process runs and can access the
network as in -2-, but calling .WaitForExit throws an "invalid handle"
exception, so still no stdout / stderr.


I'd like to know when/where the process fails, and a simple exit code isn't
enough because it handles several machines with a result message for each.
.



Relevant Pages

  • Re: Remote call to COM impersonating another user
    ... When I call LogonUser, it fails, I think because the domain I need to log ... the local domain it works fine - I become the other user when I impersonate ... This can be done by calling "CoInitializeSecurity" using PInvoke, ... IntPtr asAuthSvc, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Remote call to COM impersonating another user
    ... When I call LogonUser, it fails, I think because the domain I need to log ... that sends this information to the server and tells it to do this? ... type when calling LogonUser, before calling Impersonate. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: LogonUser fails across different domains
    ... You shouldn't be able to log on as a user from an untrusted domain (except ... And you shouldn't need to do an impersonate to access files on a ... > LogonUser() fails if the user is in a domain ... > different from that with which the executing process is running as. ...
    (microsoft.public.platformsdk.security)
  • Impersonation and UNC network resources
    ... network folder and b) an VFP8 OleDB connection. ... if I set up ASP.NET to impersonate the user, I have no problems, providing I ... don't cause ASP.NET to recompile the ASPX files. ... LogonUser() succeeds, but the directory code: ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Copy files over network
    ... I was able to impersonate a user on the remote computer, which was not even a user on the local computer, although this particular feature requires XP. ... the local client where the files are copied to? ... I never had a problem reading my file from the local computer after impersonation. ...
    (microsoft.public.vc.language)