get user id

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    get user id

    Is there a way to get the logged in user and if the user id does not match
    mine to log them out? I'm going on vacation for 2 weeks, and my co-workers
    are pranksters, so if they log into my pc to do whatever, I want to kick
    them out right away.



  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: get user id

    No, there isn't. This is what permissions are for. Why not just set
    the permissions on your machine so that they can't access what you don't
    want touched.

    And if you don't have the rights to do this, this is what network admins
    are for. They are to prevent this kind of thing.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "John" <CSharpGuy@gmai l.com> wrote in message
    news:%23C4afJtl GHA.2304@TK2MSF TNGP02.phx.gbl. ..[color=blue]
    > Is there a way to get the logged in user and if the user id does not match
    > mine to log them out? I'm going on vacation for 2 weeks, and my co-workers
    > are pranksters, so if they log into my pc to do whatever, I want to kick
    > them out right away.
    >
    >
    >[/color]


    Comment

    • Tom Spink

      #3
      Re: get user id

      John wrote:
      [color=blue]
      > Is there a way to get the logged in user and if the user id does not match
      > mine to log them out? I'm going on vacation for 2 weeks, and my co-workers
      > are pranksters, so if they log into my pc to do whatever, I want to kick
      > them out right away.[/color]

      Hi John,

      Look at Environment.Use rName to get the username of the person who started
      your application.

      But, don't bother. If you can change your local computer policies, you can
      deny certain users interactive logon rights to your workstation.

      Start -> Control Panel -> Administrative Tools -> Local Security Policy

      However, you yourself need access rights to update the local computer
      security policy. Also, make sure you don't deny yourself interactive logon
      rights.

      -- Tom Spink

      Comment

      • Peter Bromberg [C# MVP]

        #4
        RE: get user id

        Oh, and while you're at it (not to get paranoid or anything) -- you might
        want to disable the C$ Administrative share, which requires a special
        Registry entry....
        Have a nice vacation!
        Peter

        --
        Co-founder, Eggheadcafe.com developer portal:

        UnBlog:





        "John" wrote:
        [color=blue]
        > Is there a way to get the logged in user and if the user id does not match
        > mine to log them out? I'm going on vacation for 2 weeks, and my co-workers
        > are pranksters, so if they log into my pc to do whatever, I want to kick
        > them out right away.
        >
        >
        >
        >[/color]

        Comment

        • chanmm

          #5
          Re: get user id

          This might help you:


          chanmm

          "John" <CSharpGuy@gmai l.com> wrote in message
          news:%23C4afJtl GHA.2304@TK2MSF TNGP02.phx.gbl. ..[color=blue]
          > Is there a way to get the logged in user and if the user id does not match
          > mine to log them out? I'm going on vacation for 2 weeks, and my co-workers
          > are pranksters, so if they log into my pc to do whatever, I want to kick
          > them out right away.
          >
          >
          >[/color]


          Comment

          • Ian Semmel

            #6
            Re: get user id

            Actually, if the computer you are working on belongs to the company you are
            working for, they have every right to log on to it. There are many reasons why
            they might.

            You want to be careful that you have a job to come back to.

            John wrote:[color=blue]
            > Is there a way to get the logged in user and if the user id does not match
            > mine to log them out? I'm going on vacation for 2 weeks, and my co-workers
            > are pranksters, so if they log into my pc to do whatever, I want to kick
            > them out right away.
            >
            >
            >[/color]

            Comment

            Working...