CreateProcessAsUser - How to get User Token

Discussion in 'C++' started by Maya, Dec 20, 2004.

  1. Maya

    Maya Guest

    I have three questions, and any answer might help :)

    I have the following situation:
    I have application that is launched from the SYSTEM User, so it runs under this
    user too. That of course is a high security risk in many aspects. I know how
    to Create a process "AsUser", but I have to know the Username and Password
    for a user to do so. Is there a way (= does anyone know a way) to get the
    User Token for the User that is logged on, so I can run the Program under
    his security context and on his desktop?

    2. I have two applications: one has to get that token, and the other has to use
    it. There is no client-server between these two applications, so one of the
    ways to do that is that they communicate via a file. I.E.: The first
    application will get the token (which is an handle),
    write it to a file on the hardisk, and then the other application will read
    the file, retrieve the token from it and use it.
    Does anyone knows if it is possible to do that, and how? (how should the
    token be written to a file)?

    3. I have another problem that I'll try to explain, and maybe anyone will have
    an idea for that too:
    There is an option for the IIS in the web-server to run images in the
    security context of the user who is logged-on in the machine where the
    browser is.
    Now, assume that a user logged-on in machine A as "mayash", opened a browser
    and browsed to a virtual directory in machine B (machine B is the web-server
    with IIS). This virtual directory in machine B contains a simple ".cgi"
    image that is executed by the IIS.
    The IIS executes it under the context of "mayash".
    I am looking for a way for this ".cgi" image to get the "token" of mayash
    and use it for another things.
    (i.e. - to get the token from the IIS thread that runs it....)
    Does anyone has any idea how to do that?

    Thank you very much for any help,
    Maya, Dec 20, 2004
    1. Advertisements

  2. Maya wrote:
    > I have three questions, and any answer might help :)
    > [ questions snipped...]

    You need to visit (probably)
    and if they can't answer your MS IE-specific questions, they will
    most likely give you better directions.

    Victor Bazarov, Dec 20, 2004
    1. Advertisements

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. Cronus
    Paul Mensonides
    Jul 15, 2004
  2. Maya
    Joona I Palaste
    Dec 20, 2004
  3. G Fernandes
  4. Wessi
    Lawrence Kirby
    Aug 11, 2005
  5. =?Utf-8?B?Y2FzaGRlc2ttYWM=?=

    This is an unexpected token. The expected token is 'NAME'

    =?Utf-8?B?Y2FzaGRlc2ttYWM=?=, Jul 13, 2007, in forum: ASP .Net
    Jul 13, 2007

Share This Page