Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Local System Current Username and Password

Local System Current Username and Password

Scheduled Pinned Locked Moved C#
questioncsharpwindows-admin
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sifar 0
    wrote on last edited by
    #1

    Hi Everyone, I ve my c# application, in that i want to set some settings in Registry. To authenticate the user i want the user to enter local system's current username and password. How can i verify the entered username and password? Any solution...?

    Regards, -SIFAR.

    realJSOPR 2 Replies Last reply
    0
    • S Sifar 0

      Hi Everyone, I ve my c# application, in that i want to set some settings in Registry. To authenticate the user i want the user to enter local system's current username and password. How can i verify the entered username and password? Any solution...?

      Regards, -SIFAR.

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      Avoid using the registry. Use the built-in user settings instead. As for the login stuff, I'm sure you'll find an answer if you google it. [EDIT] What you could do is use Windows authentication, and verify that the currently logged in user is within a certain group. The following criteria should probably be used to verify the user: 0) The required group must be defined on the box. 1) The currently logged-in user must be in the specified group. 2) (Optionally) The user must not be in the administrator group. If you don't want to use Windows Authentication, you could set up your own and use an XML file to hold user ID's and passwords (encrypted or hashed of course). [EDIT] This question inspired me to look into windows form login functionality, and I'm writing an article about it. If you can wait a few days, I'll post a reasonably complete solution (if I don't get bored with the whole thing in the process). The sample application is what will require the most time.

      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

      modified on Thursday, October 2, 2008 10:28 AM

      S 1 Reply Last reply
      0
      • S Sifar 0

        Hi Everyone, I ve my c# application, in that i want to set some settings in Registry. To authenticate the user i want the user to enter local system's current username and password. How can i verify the entered username and password? Any solution...?

        Regards, -SIFAR.

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #3

        Here's an article I wrote today about login. See if that's what you want. http://www.codeproject.com/KB/miscctrl/Application_Login.aspx[^]

        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

        1 Reply Last reply
        0
        • realJSOPR realJSOP

          Avoid using the registry. Use the built-in user settings instead. As for the login stuff, I'm sure you'll find an answer if you google it. [EDIT] What you could do is use Windows authentication, and verify that the currently logged in user is within a certain group. The following criteria should probably be used to verify the user: 0) The required group must be defined on the box. 1) The currently logged-in user must be in the specified group. 2) (Optionally) The user must not be in the administrator group. If you don't want to use Windows Authentication, you could set up your own and use an XML file to hold user ID's and passwords (encrypted or hashed of course). [EDIT] This question inspired me to look into windows form login functionality, and I'm writing an article about it. If you can wait a few days, I'll post a reasonably complete solution (if I don't get bored with the whole thing in the process). The sample application is what will require the most time.

          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
          -----
          "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

          modified on Thursday, October 2, 2008 10:28 AM

          S Offline
          S Offline
          Sifar 0
          wrote on last edited by
          #4

          Thanx John, Looking forward for your further post.

          Regards, -SIFAR.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups