Re: Impersonate a user from a service

From: booster (saltynuts2002@msn.com)
Date: 02/04/03

  • Next message: RaminDeja: "Re: Impersonate a user from a service"
    From: "booster" <saltynuts2002@msn.com>
    Date: Tue, 4 Feb 2003 14:39:01 -0500
    
    

    then you're not doing it properly. I've done this from a service as well and
    have used it to read the users home dir on a remote comp that he only has
    access to
    "RaminDeja" <ramindeja@yahoo.ca> wrote in message
    news:6512f1b1.0302040712.2bd05874@posting.google.com...
    > Thanks for your response,
    >
    > I know about the API and I actually use it, but the environment and
    > the profile still correspond to the System Local and not the user I
    > created the token for. As I mentioned before, I also look for a way so
    > that when call an API to the get the cursor properties
    > (SystemParametersInfo), the return value correspond to the user I
    > supplied.
    >
    > Regards,
    > RaminDeja.
    >
    > "booster" <saltynuts2002@msn.com> wrote in message
    news:<Ofg8128yCHA.2368@TK2MSFTNGP12>...
    > > ImpersonateLoggedOnUser()
    > >
    > > "RaminDeja" <ramindeja@yahoo.ca> wrote in message
    > > news:6512f1b1.0302031047.79092386@posting.google.com...
    > > > Hi,
    > > >
    > > > Our tool needs to extract desktop and network settings of a user by
    > > > calling SDK APIs (ex. SystemParametersInfo) and loading user's
    > > > registry entries. We do not have the user passwords but their
    > > > usernames.
    > > >
    > > > This is what I've tried so far with little success:
    > > >
    > > > 1. The service creates a token based on the user's SID (ZwCreateToken)
    > > > 2. Loads the user's profile
    > > > 3. Loads the user's Registry hive (NTUSER.DAT)
    > > >
    > > > But the the APIs always return the information related to the Local
    > > > System!
    > > >
    > > > I could call CreateProcessAsUser(), but I rather not create another
    > > > process. Besides, my tests showed that even a new process still needs
    > > > steps 2. and 3. with the APIs always returning Local System related
    > > > information.
    > > >
    > > > Any help will be greatly appreciated, I've tried almost all the
    > > > newsgroups and couldn't find a proper solution.
    > > >
    > > > Regards,
    > > > RaminDeja.



    Relevant Pages

    • Re: Impersonate a user from a service
      ... > that when call an API to the get the cursor properties ... >>> Our tool needs to extract desktop and network settings of a user by ... >>> Regards, ... >>> RaminDeja. ...
      (microsoft.public.win2000.security)
    • Re: Impersonate a user from a service
      ... > that when call an API to the get the cursor properties ... >>> Our tool needs to extract desktop and network settings of a user by ... >>> Regards, ... >>> RaminDeja. ...
      (microsoft.public.security)
    • Re: Network cable unplugged
      ... > Ok so far we had API, WMI, how about going low level to NDIS? ... > Best regards, ... >> through various news groups and the MS API, ...
      (microsoft.public.windowsxp.embedded)
    • Re: Newbie question
      ... TAPI is best suited to applications where there is a human at one end ... Version 2.1 of the TAPI API is a procedural API with a C slant. ... and click the books link. ... Regards, ...
      (microsoft.public.win32.programmer.tapi)
    • Re: Impersonate a user from a service
      ... the profile still correspond to the System Local and not the user I ... that when call an API to the get the cursor properties ... >> Our tool needs to extract desktop and network settings of a user by ...
      (microsoft.public.security)