469,270 Members | 1,725 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

How do you login with your NTID username and password

235 100+
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
Expand|Select|Wrap|Line Numbers
  1.  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:
Expand|Select|Wrap|Line Numbers
  1. VBA.Environ (UserName)
  3. If Forms!frmMain1.UserName.Value = tblReviewNames.NTID Then
  5. DoCmd.OpenForm "frmMain"
  7. Else
  9. Exit Sub
  11. End If
  13. End Sub
It keeps getting hung up on the
Expand|Select|Wrap|Line Numbers
  1. 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.
Aug 8 '11 #1

✓ answered by NeoPa

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.

4 12819
32,171 Expert Mod 16PB
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.
Aug 8 '11 #2
235 100+
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?
Aug 9 '11 #3
931 Expert 512MB
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.

Aug 9 '11 #4
32,171 Expert Mod 16PB
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.
Aug 10 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by deko | last post: by
reply views Thread by yurps | last post: by
4 posts views Thread by Lobang Trader | last post: by
12 posts views Thread by Cecil | last post: by
4 posts views Thread by nemo | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.