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 / C++ / MFC
  4. LogonUser (Sort of)

LogonUser (Sort of)

Scheduled Pinned Locked Moved C / C++ / MFC
databasequestionlearning
6 Posts 3 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.
  • E Offline
    E Offline
    Eurosid
    wrote on last edited by
    #1

    I have a desktop application that must authenticate each user. I am not allowed to have my own password file, nor to store passwords in a database. The application needs to work on XP and Win2K, and will be written in VC6++. LogonUser looks perfect, because it lets me authenticate the passwords the same way that Windows does when users log in every day. It works fine on XP. It fails on Win2K, of course, because SE_TCB_NAME is not granted to user accounts. Any suggestions for something similar? I do NOT need the token that is normally generated by LogonUser, as I'm not starting a service or impersonating a user. I only need the BOOL that tells me the password is valid or not.

    K E 2 Replies Last reply
    0
    • E Eurosid

      I have a desktop application that must authenticate each user. I am not allowed to have my own password file, nor to store passwords in a database. The application needs to work on XP and Win2K, and will be written in VC6++. LogonUser looks perfect, because it lets me authenticate the passwords the same way that Windows does when users log in every day. It works fine on XP. It fails on Win2K, of course, because SE_TCB_NAME is not granted to user accounts. Any suggestions for something similar? I do NOT need the token that is normally generated by LogonUser, as I'm not starting a service or impersonating a user. I only need the BOOL that tells me the password is valid or not.

      K Offline
      K Offline
      Kharfax
      wrote on last edited by
      #2

      mmmm... I wouldn`t like to log on on an application using my windows password... I never know what are you going to do with it. I think you need to look for another approach. If you need login in an application you will need an encripted passwords file.

      E 1 Reply Last reply
      0
      • K Kharfax

        mmmm... I wouldn`t like to log on on an application using my windows password... I never know what are you going to do with it. I think you need to look for another approach. If you need login in an application you will need an encripted passwords file.

        E Offline
        E Offline
        Eurosid
        wrote on last edited by
        #3

        Company IT policy doesn't allow me to keep my own password file, even if it is encrypted. We thought of using the Windows password because it is an authenticaion system already available in the company.

        J 1 Reply Last reply
        0
        • E Eurosid

          Company IT policy doesn't allow me to keep my own password file, even if it is encrypted. We thought of using the Windows password because it is an authenticaion system already available in the company.

          J Offline
          J Offline
          James Brown
          wrote on last edited by
          #4

          if the user is logged in and is using your program then they are already authenticated. If you are doing this over a network then you could use named pipes and check the user at the other end.. james
          http://www.catch22.net

          E 1 Reply Last reply
          0
          • E Eurosid

            I have a desktop application that must authenticate each user. I am not allowed to have my own password file, nor to store passwords in a database. The application needs to work on XP and Win2K, and will be written in VC6++. LogonUser looks perfect, because it lets me authenticate the passwords the same way that Windows does when users log in every day. It works fine on XP. It fails on Win2K, of course, because SE_TCB_NAME is not granted to user accounts. Any suggestions for something similar? I do NOT need the token that is normally generated by LogonUser, as I'm not starting a service or impersonating a user. I only need the BOOL that tells me the password is valid or not.

            E Offline
            E Offline
            Eurosid
            wrote on last edited by
            #5

            There is a way to do this. Here is a CP article in Purgatory: http://www.codeproject.com/Purgatory/UserAuthentication.asp[^] The CP article points to a Microsoft KB article: http://support.microsoft.com/kb/180548/EN-US/[^]

            1 Reply Last reply
            0
            • J James Brown

              if the user is logged in and is using your program then they are already authenticated. If you are doing this over a network then you could use named pipes and check the user at the other end.. james
              http://www.catch22.net

              E Offline
              E Offline
              Eurosid
              wrote on last edited by
              #6

              I also argued the position that logging into Windows should suffice. After all, Office works this way. We use Outlook here, and you need not provide a seperate password for that. The local powers here were unconvinced, so I have been looking for a way to do it. Thanks.

              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