How do you login with your NTID username and password

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anoble1
    New Member
    • Jul 2008
    • 246

    How do you login with your NTID username and password

    Hello all,

    I am creating a login to a MS Database I created. Every user has an NTID and password. The password changes every 30 days (company policy). Anyway, I want a way where before you go into the program it pops up and wants you to enter your NTID password. I know you can do this
    Code:
     Environ("UserName")
    for the username. But I really have no clue how to do the password. Any suggestions?

    Also I would like to add. I have a table that has all of the users in it along with their NTID (Username). What kind of code can I write that checks to see if their current username = the tbl username?
    What I have now looks like this:
    Code:
    VBA.Environ (UserName)
    
    If Forms!frmMain1.UserName.Value = tblReviewNames.NTID Then
    
    DoCmd.OpenForm "frmMain"
    
    Else
    
    Exit Sub
    
    End If
    
    End Sub
    It keeps getting hung up on the
    Code:
    If Forms!frmMain1.UserName.Value = tblReviewNames.NTID Then
    I have written it 2 different ways. I have a textbox on the main form that shows the NTID in it.
    Last edited by anoble1; Aug 8 '11, 08:00 PM. Reason: Addition of requests
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32636

    #2
    Function to Return UserName (NT Login) of Current User gives you a way of determining the NTID.

    I'm not clear why you would want to check this against a database table or check the password. The ID is the name, and the password has already been checked by Windows.

    Comment

    • anoble1
      New Member
      • Jul 2008
      • 246

      #3
      Thanks, I got your UserName Function to work perfect! But, I have a lot of network users. I have an access program that can be on anyone's PC. I would just like to know if anyone has been able to use a NT Login with a UserName AND Password in their Access program?

      Comment

      • patjones
        Recognized Expert Contributor
        • Jun 2007
        • 931

        #4
        I tried to do this once, a couple years ago, but was not successful. I can imagine that getting the password would be the difficult part.

        When I need username/password capability for a database I just build a small form with two text boxes and attach it to a username/password table. Usually I make everyone's user ID the same as their system username and let them type in their password on the first log in.

        It's probably not 100% secure, but I'm more concerned with tracking who did what than with security anyway.

        Pat

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32636

          #5
          I'm afraid that is simply flawed logic (Not wishing to sound patronising but failing to see an alternative way to express this very important point). If a user is using Access on their PC and have access to the network resources, then they will have had to have given a valid password already. Most Domain based network systems are set up only to allow domain accounts as credentials for a PC.

          The point here is that once someone is logically inside the security perimiter and identified, it makes no sense to continually (or at all) recheck their credentials. Either the security system is reliable, in which case they are who they claim to be, or it's not, in which case using it again for further validation is equally unreliable.

          As you ask the question though, I will put my Networks Administrator cap on and say "No. It's not (possible to access the password of a user for rechecking)."

          For the security system to be remotely reliable it cannot possibly share such information outside of itself. It doesn't store passwords in unencrypted form anyway and those that are stored use irreversible (One-way) encryption (Even Networks Administrators don't have access to the passwords of their users. If one is lost all they can do is reset it and let the user know the new temporary one). I believe there is a facility provided somewhere such that a password could be validated against the SAM database, but I also believe that is available only to software accredited to be trusted at that level. I'm not positive on that last point though, nor can I tell you what the facility is or where to find it if it does exist.

          The most important point here though is that, while it's not entirely inconceivable that there may be reasons to recheck a database user's credentials, it is as close as makes no difference. Once the operator is validated by the system they are identified and need not re-enter any passwords. This is good news for you as it's a level of input the operator doesn't need, to make them dislike using your database.

          Comment

          Working...