Re: failing Process and impersonation connection

From: Support (RemoveThis_Support_at_mail.oci.state.ga.us)
Date: 02/11/05


Date: Fri, 11 Feb 2005 09:14:16 -0500

This is confirmed when using whoamI - I am NOT the network admin account
when I shell out, so do you know how to start a shell process under an
impersonated account in vb.net ?
Thanks

"Support" <RemoveThis_Support@mail.oci.state.ga.us> wrote in message
news:uU$f$KEEFHA.3492@TK2MSFTNGP12.phx.gbl...
> Hello:
> In vb.net I impersonate a domain administrator
> I confirm this using: WindowsIdentity.GetCurrent().Name))
> then I start a process which shells out and uses CACLS to assign a group
> right to a file and I get an Access Denied error message.
>
> Dim impersonatedUser As WindowsImpersonationContext = newId.Impersonate()
> MsgBox(WindowsIdentity.GetCurrent().Name)) ' to confirm I am the network
> admin
>
> MyProcessString = "cacls.exe """ + ICopyTo + """ /E /G """ + ICopyRights +
> """:R"
> Dim myProcess = New Process()
> myProcess.StartInfo.FileName = "cmd.exe"
> myProcess.StartInfo.Arguments = "MyProcessString"
> myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
> myProcess.StartInfo.RedirectStandardOutput = False
> myProcess.StartInfo.CreateNoWindow = False
> myProcess.Start()
> myProcess.WaitForExit()
>
> Now, when I logon as under the network domain account on my machine and
> run the CACLS from command line it works.
> Also, when I run loged in as myself using the RUNAS command line, it also
> works.
> It appears that when I create the process, it is NOT using the
> impersonated account but I dont know how to do this...
>
> Any thought s?
>
> Thanks
>
> Terry
>
>



Relevant Pages

  • Re: Crash upon accessing View menu in Windows Explorer
    ... if the same thing happens with another admin account it may ... > 1) The problem occurs not just in Windows Explorer and My Computer, etc., ... > 4) I checked which Shell Extensions (using the Shell Viewer program you ... > similar Shell Extension called $Address, ...
    (microsoft.public.windowsxp.general)
  • Re: Crash upon accessing View menu in Windows Explorer
    ... own account. ... I checked which Shell Extensions (using the Shell Viewer program you ... similar Shell Extension called $Address, also a Shell Browser UI ...
    (microsoft.public.windowsxp.general)
  • RE: User?s and Shells
    ... the shell as well the password for an account. ... Disabling the password makes ... The ideal solution is to have a binary program for the account shell ... defense in depth/layers is the key to security. ...
    (Focus-Linux)
  • Re: Only an ftp account
    ... > You may also want to add that user to /etc/ftpchroot which will chroot ... >> How would I be able to give an account to someone where they can only ... >> login and use FTP? ... Let me just point out that just changing the shell to /sbin/nologin ...
    (FreeBSD-Security)
  • Re: Remove Taskbar from the Desktop
    ... If you make the change while logged on to the account you want restricted, you'll have to log off/log on to see the change. ... Doug Knox, MS-MVP Windows Media Center\Windows Powered Smart Display\Security ... >> You may want to look at replacing the Shell statement in the Registry. ... >>> Johnny ...
    (microsoft.public.windowsxp.security_admin)

Quantcast