有没有办法在ms-access数据库中验证用户?

时间:2022-09-27 13:25:11

I have a MS-access database. But it is on the shared drive. And it is required that only some selected number of people can use it. Is there a way to authenticate the user?

我有一个MS访问数据库。但它在共享驱动器上。并且要求只有一些选定数量的人可以使用它。有没有办法验证用户?

7 个解决方案

#1


4  

Since Access is file driven, why not create a folder in the shared drive and assign folder permissions to the appropriate people.

由于Access是文件驱动的,因此不能在共享驱动器中创建文件夹并将文件夹权限分配给适当的人员。

#2


6  

Yes, open the database then run the Tools->Security->User-Level Security Wizard. It will step you through the process of creating a new workgroup file, creating users and groups, and securing the Access objects.

是,打开数据库,然后运行工具 - >安全 - >用户级安全向导。它将引导您完成创建新工作组文件,创建用户和组以及保护Access对象的过程。

#3


2  

Do both. Set access permissions on the directory AND create a new security file for it.

做到这两点。设置目录的访问权限并为其创建新的安全文件。

The directory is your front-line security, and limits access on a macro level

该目录是您的前线安全性,并限制宏级别的访问

The security file can be used to segment access to the various tables, forms, reports, etc. You can even us it give some people read only access and others more full permissions.

安全文件可用于分割对各种表,表单,报告等的访问。您甚至可以为我们提供只读访问权限和其他更多完全权限。

#4


0  

User-level security is not available in Access 2007.

Access 2007中不提供用户级安全性。

Get started with Access 2007 security offers:

开始使用Access 2007安全提供:

  • Trust (enable) the disabled content in a database
  • 信任(启用)数据库中的禁用内容

  • Use a password to encrypt or decrypt a database
  • 使用密码加密或解密数据库

  • Package, sign, and deploy an Office Access 2007 database
  • 打包,签名和部署Office Access 2007数据库

#5


0  

If you are on a domain could you not use file level security to prevent users from accessing it?

如果您在域中,您是否可以使用文件级安全性来阻止用户访问它?

#6


0  

I do all of this in VBA. In the switchboard Form_Open sub, Read the user name into a string variable with a windows API, then check to see if the user name in on your list of valid users. If OK, issue a welcome message, if not OK exit Access.

我在VBA中做了所有这些。在交换机Form_Open sub中,使用Windows API将用户名读入字符串变量,然后检查有效用户列表中的用户名是否在其中。如果没问题,发出欢迎消息,如果没有,请退出Access。

' check user Dim user As String Dim AuthorizedUser As Boolean user = UCase(CurrentUser())

'check user Dim user As String Dim AuthorizedUser As Boolean user = UCase(CurrentUser())

AuthorizedUser = True
Select Case user
    Case "USER_A":
    Case "USER_B":
    Case "USER_C":     
    Case Else: AuthorizedUser = False
End Select

If AuthorizedUser = True Then
   MsgBox "Welcome authorized user " & user
Else
   MsgBox user & "is not Authorized. For access to this database contact User_A"
   DoCmd.Quit
End If

#7


-2  

Two solutions:

  1. Place the Access file on a file share with permissions set appropriately. This doesn't work really well if you need to provide read-only access since Access can't write out the temporary .ldb file that it creates when opening an Access file (.mdb).

    将Access文件放在具有适当权限设置的文件共享上。如果您需要提供只读访问权限,这不能很好地工作,因为Access无法写出它在打开Access文件(.mdb)时创建的临时.ldb文件。

  2. Move the "data" of the Access file to a Sql Server instance... where you can permissions in SQL server to restrict what people can do. We use this method to provide readonly access to the everyone, and then specific people with read-write access. To move the data to SQL you would import it into a new SQL database and then link the tables into the Access file (renaming so that reports/queries/etc continue to work).

    将Access文件的“数据”移动到Sql Server实例...您可以在SQL Server中限制人们可以执行的操作。我们使用此方法提供对每个人的只读访问权限,然后是具有读写访问权限的特定人员。要将数据移动到SQL,您可以将其导入新的SQL数据库,然后将表链接到Access文件(重命名以便报表/查询/等继续工作)。

#1


4  

Since Access is file driven, why not create a folder in the shared drive and assign folder permissions to the appropriate people.

由于Access是文件驱动的,因此不能在共享驱动器中创建文件夹并将文件夹权限分配给适当的人员。

#2


6  

Yes, open the database then run the Tools->Security->User-Level Security Wizard. It will step you through the process of creating a new workgroup file, creating users and groups, and securing the Access objects.

是,打开数据库,然后运行工具 - >安全 - >用户级安全向导。它将引导您完成创建新工作组文件,创建用户和组以及保护Access对象的过程。

#3


2  

Do both. Set access permissions on the directory AND create a new security file for it.

做到这两点。设置目录的访问权限并为其创建新的安全文件。

The directory is your front-line security, and limits access on a macro level

该目录是您的前线安全性,并限制宏级别的访问

The security file can be used to segment access to the various tables, forms, reports, etc. You can even us it give some people read only access and others more full permissions.

安全文件可用于分割对各种表,表单,报告等的访问。您甚至可以为我们提供只读访问权限和其他更多完全权限。

#4


0  

User-level security is not available in Access 2007.

Access 2007中不提供用户级安全性。

Get started with Access 2007 security offers:

开始使用Access 2007安全提供:

  • Trust (enable) the disabled content in a database
  • 信任(启用)数据库中的禁用内容

  • Use a password to encrypt or decrypt a database
  • 使用密码加密或解密数据库

  • Package, sign, and deploy an Office Access 2007 database
  • 打包,签名和部署Office Access 2007数据库

#5


0  

If you are on a domain could you not use file level security to prevent users from accessing it?

如果您在域中,您是否可以使用文件级安全性来阻止用户访问它?

#6


0  

I do all of this in VBA. In the switchboard Form_Open sub, Read the user name into a string variable with a windows API, then check to see if the user name in on your list of valid users. If OK, issue a welcome message, if not OK exit Access.

我在VBA中做了所有这些。在交换机Form_Open sub中,使用Windows API将用户名读入字符串变量,然后检查有效用户列表中的用户名是否在其中。如果没问题,发出欢迎消息,如果没有,请退出Access。

' check user Dim user As String Dim AuthorizedUser As Boolean user = UCase(CurrentUser())

'check user Dim user As String Dim AuthorizedUser As Boolean user = UCase(CurrentUser())

AuthorizedUser = True
Select Case user
    Case "USER_A":
    Case "USER_B":
    Case "USER_C":     
    Case Else: AuthorizedUser = False
End Select

If AuthorizedUser = True Then
   MsgBox "Welcome authorized user " & user
Else
   MsgBox user & "is not Authorized. For access to this database contact User_A"
   DoCmd.Quit
End If

#7


-2  

Two solutions:

  1. Place the Access file on a file share with permissions set appropriately. This doesn't work really well if you need to provide read-only access since Access can't write out the temporary .ldb file that it creates when opening an Access file (.mdb).

    将Access文件放在具有适当权限设置的文件共享上。如果您需要提供只读访问权限,这不能很好地工作,因为Access无法写出它在打开Access文件(.mdb)时创建的临时.ldb文件。

  2. Move the "data" of the Access file to a Sql Server instance... where you can permissions in SQL server to restrict what people can do. We use this method to provide readonly access to the everyone, and then specific people with read-write access. To move the data to SQL you would import it into a new SQL database and then link the tables into the Access file (renaming so that reports/queries/etc continue to work).

    将Access文件的“数据”移动到Sql Server实例...您可以在SQL Server中限制人们可以执行的操作。我们使用此方法提供对每个人的只读访问权限,然后是具有读写访问权限的特定人员。要将数据移动到SQL,您可以将其导入新的SQL数据库,然后将表链接到Access文件(重命名以便报表/查询/等继续工作)。