473,409 Members | 1,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

ODBC, SQL and Access: File DSN ignores authentication settings

I have found info on this problem at MS, but they say this problem
does not occur with SQL 2K and MDAC 2.6 SP2, yet I am still
experiencing it:

I have a SQL user specifically created to SELECT on 5 tables in one
database. I have created an ODBC file DSN using that login/password. I
create an Access DB, attempt to link to the five SQL tables using that
DSN, using a trusted connection. The ODBC drivers ignore the users
permissions, and instead use the PUBLIC permissions.

When the Windows login I am using has access to the database, I get
the tables that login has permissions for.

When the Windows login I am using has no access to the database, I get
a failure for user NULL.

I can forego the trusted connection, enter the login password, and see
exactly the tables I want. I link them to the Access DB, can open them
and see the data.

I close Access and reopen the same Access DB. Now, when I try to open
one of the linked tables, I get the same failure - permissions are no
good.
Nov 12 '05 #1
2 6236
Tina Robichaux wrote:
I have found info on this problem at MS, but they say this problem
does not occur with SQL 2K and MDAC 2.6 SP2, yet I am still
experiencing it:

I have a SQL user specifically created to SELECT on 5 tables in one
database. I have created an ODBC file DSN using that login/password. I
create an Access DB, attempt to link to the five SQL tables using that
DSN, using a trusted connection. The ODBC drivers ignore the users
permissions, and instead use the PUBLIC permissions.

When the Windows login I am using has access to the database, I get
the tables that login has permissions for.

When the Windows login I am using has no access to the database, I get
a failure for user NULL.

I can forego the trusted connection, enter the login password, and see
exactly the tables I want. I link them to the Access DB, can open them
and see the data.

I close Access and reopen the same Access DB. Now, when I try to open
one of the linked tables, I get the same failure - permissions are no
good.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you are using a Trusted_Connection=Yes in your connection string,
that means the SQL authentication will use the NT login authentication
process. Since not everyone has the same login as you set up for the
DSN (or shouldn't) you'll have to remove the "Trusted_Connection"
parameter and hard code the user name and password in the ODBC
connection string. E.g.:

ODBC;DSN=<dsn name>;UID=<user name>;PWD=<password>;... etc.

It is easier to use Roles:

Create a user setting for each user. Then create a Role for your db and
place each user in that Role. For your db's objects assign permissions
only to the Role. Any new user is added to the Role. Then use
Trusted_Connections in the connection string.

Using a Role simplifies user/db-object security administration.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQIRGv4echKqOuFEgEQJgBQCg4wFa3m5vi9TlxW8j/PNy1xyQEYIAoOWC
moDtRbmKwARJagVGqSKCMNYG
=GTOV
-----END PGP SIGNATURE-----

Nov 12 '05 #2
Using a 'Trusted Connection' means using the Windows Login.

If you want to use a SQL User, that means using "With SQL
Server Authentication"

You can put the user name and password into the DSN: you
can save the DSN (file or user DSN) so that only the user
with the appropriate Windows Login can use the DSN. This
allows you to control exactly the permission you give
to each user. However, each user will still be able to
use that DSN for any general purpose, so it will not offer
more security than just putting the Windows User into the
same group as the SQL User that you have defined.

(david)

"Tina Robichaux" <ti**@interland.com> wrote in message
news:38**************************@posting.google.c om...
I have found info on this problem at MS, but they say this problem
does not occur with SQL 2K and MDAC 2.6 SP2, yet I am still
experiencing it:

I have a SQL user specifically created to SELECT on 5 tables in one
database. I have created an ODBC file DSN using that login/password. I
create an Access DB, attempt to link to the five SQL tables using that
DSN, using a trusted connection. The ODBC drivers ignore the users
permissions, and instead use the PUBLIC permissions.

When the Windows login I am using has access to the database, I get
the tables that login has permissions for.

When the Windows login I am using has no access to the database, I get
a failure for user NULL.

I can forego the trusted connection, enter the login password, and see
exactly the tables I want. I link them to the Access DB, can open them
and see the data.

I close Access and reopen the same Access DB. Now, when I try to open
one of the linked tables, I get the same failure - permissions are no
good.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Lozzi | last post by:
This happens a lot to my databases. I store them at the root of my developing files, i.e. c:\My Projects\Proj1\database.mdb. Randomly, the security settings on this database will drop to the basic...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
3
by: Lauren Quantrell | last post by:
Maybe a dumb question - I'm new to ODBC. How do I install an Access ..mde file on a user's workstation and create the ODBC connection to the backend SQL Server database without having to go through...
2
by: Tina Robichaux | last post by:
I have found info on this problem at MS, but they say this problem does not occur with SQL 2K and MDAC 2.6 SP2, yet I am still experiencing it: I have a SQL user specifically created to SELECT...
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
29
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ...
0
by: William F. Zachmann | last post by:
A web site that will run on Windows Server 2003 and IIS 6.0 needs to provide three levels of access, one for the public and two others for two levels of subscribers. This is a port of a prior site...
5
by: somersbar | last post by:
hello all, im trying to connect to a microsoft access database from an ASP.NET web form. i keep getting the following error though: ERROR Could not use '(unknown)'; file already in use....
7
by: Salad | last post by:
I am converting an application from A97 to A2003. I have 2 tables created by another application as a Foxpro.dbf. The table has no index. The connect string in A97 is FoxPro...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.