verifying network password

verifying network password

Post by David S. Ehni » Thu, 13 Feb 1997 04:00:00



Environment:  Access 2.0/VB4/MSVC on Win3.11 with Lan Manager and NT Server

Some functionality in my app needs to be password verified.  
I would like for the users to be able to use their already
memorized network passwords.  Is there some dll function
that I could call that would verify (directly or indirectly) the user
has entered the correct password? I'm already using the handy
netapi.dll to retrieve current userid and other workstation information.

Does anyone have any idea about this.  Even to point me in a direction?

Many thanks in advance,

David.

 
 
 

verifying network password

Post by Darryl Park » Sat, 15 Feb 1997 04:00:00


One of the things we do validate using the network password is to use the
windows API to open a new drive to that server then check for errors.  Try
something like this (This is old 16 bit code):
    retcode = WNetAddConnection("\\" & gstrINIServerName & "\" & gstrINIDir
& "%" & strUserID, txtPassword, gstrINIDrive)
    Select Case retcode  ' Test input.
        Case WN_ALREADY_CONNECTED
            If MsgBox(gstrINIDrive & " Drive is already in use.  Disconnect
before connecting?", MB_OKCANCEL + MB_ICONQUESTION, "Drive in Use.") =
IDCANCEL Then GoTo btnOK_Terminate
            If WNetCancelConnection(gstrINIDrive, 1) > 0 Then
                MsgBox "Error disconnecting from drive " & gstrINIDrive &
".  Access to Maintenance Menu denied.", MB_OK + MB_ICONSTOP, "Net Error"
                GoTo btnOK_Terminate
            End If
            GoTo btnOK_TryAgain
        Case WN_BAD_PASSWORD
            txtAttempts = txtAttempts + 1
            If txtAttempts > 3 Then
                MsgBox "Number of Allowed Login Attempts Exceeded.  Access
to Maintenance Menu denied.", MB_OK + MB_ICONSTOP, "Security Error!"
                GoTo btnOK_Terminate
            Else
                MsgBox "Invalid userid/password! Please Correct. " &
txtAttempts & " Attempts.", MB_OK + MB_ICONSTOP, "Login Error"
            End If
        Case WN_SUCCESS
            gstrPassWd = txtPassword
                gstrUserID = strUserID
            DoCmd Close
            If IsLoaded("frmMaintenanceMenu") Then
                DoCmd SelectObject A_FORM, "xxx"
            Else
                DoCmd OpenForm "xxx"
            End If
            DoCmd Restore
        Case Else               ' Must be something else.
            MsgBox "Unable to connect to network drive " & gstrINIDrive &
".  Access to Maintenance Menu denied.", MB_OK + MB_ICONSTOP, "Network
Error"
            GoTo btnOK_Terminate
    End Select



Quote:> Environment:  Access 2.0/VB4/MSVC on Win3.11 with Lan Manager and NT
Server

> Some functionality in my app needs to be password verified.  
> I would like for the users to be able to use their already
> memorized network passwords.  Is there some dll function
> that I could call that would verify (directly or indirectly) the user
> has entered the correct password? I'm already using the handy
> netapi.dll to retrieve current userid and other workstation information.

> Does anyone have any idea about this.  Even to point me in a direction?

> Many thanks in advance,

> David.


 
 
 

1. Verifying SQL-Server password

I am writing a VC++ 5 program using databound controls in which the user
has to enter a user name and password in the dialog box. I need to write
code to check whether the password entered by the user is the same as
the password of the SQL-Server database (and determine users access
rights). How do I do this.

2. Interbase Specs

3. Verify Password Passed from ASP

4. How do you break vectors up?

5. Verifying passwords have been changed in oracle

6. Article Q279526 does not have a fix to download

7. db2 function to verify login/password

8. MS-Access report in Visual Basic

9. verify existing oracle password before changing

10. cannot verify userid and password through asp page

11. Verifying a user id and password against NT

12. Password Verify Function Problem

13. unable to connect to sql server database and verify userid and password