Using NT logon to authenticate Access User

Posted on 1999-12-21
Medium Priority
Last Modified: 2008-03-10
I have a database in Access97 that automatically detects the NT userid.  I would like to use this information to set the current user.

In other words, I don't want my users to have to logon, instead I want to create users in access with their NT userid's, then detect the NT id at logon and compare it to the user name in the users list, if the name does not exist, I'd like to either log the person on as guest or kick them out of the database.  

If I can implement this, no passwords will be necessary because detecting the NT userid would authenticate.

If I cannot do that, can I at least allow users to logon as guest (or whatever), then detect their userid's and somehow programatically change the current user to the NT id?

Any help at all would be appreciated.

Question by:Jinxy
  • 2
  • 2

Accepted Solution

JimMorgan earned 800 total points
ID: 2298886
The very suggestion that I was giving someone else in the last few days who was worried about login and passwords.

In Novell we have the capability of writing a logon script which allows us to pass the userid on to a program in the command line, or to put the userid in an environmental table.

It would probably be best to use somekind of network or environmental variable to get into Access in the first place.

If this does not work out, then once in Access (using a login database), you can open the real database with the usernames that you have arrived from NT.

I believe that this is what you want to do.  Yes?  Do you know how to open a workspace from within Access?  If not, I'll try to supply you with some code samples.


Author Comment

ID: 2300457

The logon database idea sounds like the way to proceed.  If you would supply the code for opening a workspace, I would appreciate it and thanks for all of your help.


Author Comment

ID: 2300855

Thanks for your response, I found it extremely useful.  I hope all goes well for you on this site and that you continue to help the up and coming.

You are truly  a person who believes in the "spirit" of helping.

-Charlene (Jinxy)

Expert Comment

ID: 2301713
Rather than giving you all the code, let me point some areas to look at within Access and you can decide which is the best method.

For opening workspaces look under help for CreateWorkSpace Method.

For opening databases look under help for OpenDatabase Method.

There could be an alternative method by just opening two sessions of Access.  The initial load database and the program database.

Let me find the code for the alternate method and post it for you.


Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
When we develop an application in Ms Access 2016 we should also try to protect the queries, macros and table links. I know I may not have a permanent solution but for novice users, they will not manage to break your application. Below is the detail …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question