subprocess and win32security.ImpersonateLoggedOnUser

Discussion in 'Python' started by Emin.shopper Martinian.shopper, Jun 1, 2009.

  1. Dear Experts,

    I am having some issues with the subprocess module and how it
    interacts with win32security.ImpersonateLoggedOnUser. Specifically, I
    use the latter to change users but the new user does not seem to be
    properly inherited when I spawn further subprocesses.

    I am doing something like

    import win32security, win32con
    handle = win32security.LogonUser(
    user,domain,password,win32con.LOGON32_LOGON_INTERACTIVE,
    win32con.LOGON32_PROVIDER_DEFAULT)

    win32security.ImpersonateLoggedOnUser(handle)

    Then spawning subprocesses but the subprocesses cannot read the same
    UNC paths that that the parent could.

    Any advice on either spawning subprocesses which inherit parent user
    properly or changing users in a better way on Windows would be greatly
    appreciated.

    Thanks,
    -Emin
     
    Emin.shopper Martinian.shopper, Jun 1, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darrell

    win32security.LogonUser

    Darrell, Jul 8, 2003, in forum: Python
    Replies:
    1
    Views:
    1,370
    John Abel
    Jul 8, 2003
  2. John Abel

    Re: win32security.LogonUser

    John Abel, Jul 8, 2003, in forum: Python
    Replies:
    0
    Views:
    408
    John Abel
    Jul 8, 2003
  3. Tim Golden
    Replies:
    0
    Views:
    410
    Tim Golden
    Jun 1, 2009
  4. D

    Using ImpersonateLoggedOnUser

    D, Feb 27, 2005, in forum: ASP .Net Security
    Replies:
    0
    Views:
    120
  5. Dave

    ImpersonateLoggedOnUser

    Dave, Dec 15, 2003, in forum: ASP General
    Replies:
    2
    Views:
    221
    Guest
    Dec 16, 2003
Loading...

Share This Page