How to set up smartphones and PCs. Informational portal
  • home
  • Iron
  • Setting a password in a Microsoft Access database (.Mdb). Protecting an Access database with a password

Setting a password in a Microsoft Access database (.Mdb). Protecting an Access database with a password

The easiest way to protect your database is with a password. You can assign a password to the Access database, which will be required every time you open it.

Setting and Removing a Database Security Password

To set a password to protect the database:

  1. Close the database. If the database is shared over a network, make sure other users shut it down.
  2. Back up your database and store it in a safe place.
  3. On the Access menu, choose File ›Open(File ›Open).
  4. Highlight the database file.
  5. Click the arrow to the right of the button Open(Open). In the drop-down list of database open modes, select the item Monopoly(Open Exclusive). The database will open in exclusive mode.
  6. Select a team Service ›Security› Set database password(Tools ›Security› Set Database Password).
  7. In the dialog box that appears, enter in the field Password(Password) The password to protect the database is case sensitive.
  8. Enter the password again in the field Confirmation(Verify).
  9. Click the button OK.

The database is now password protected and whenever the user opens the database, a dialog box will be displayed asking for the password. Remember or save your password in a safe place. If you forget your password, the database cannot be opened.

Comment
Do not password protect the database before replicating it, otherwise it will not be able to sync with other replicas
.

If the database is protected at the user level, only a user with administrative rights can set a password to open it. Setting a password does not affect user-level security. These two protection methods can be used simultaneously. The database password is stored in the database, not in the workgroup file.

To remove the password for protecting the database:

  1. Open the database in exclusive mode.
  2. To the dialog box Password required(Password Required) Please enter the password.
  3. Select a team Service ›Security› Delete database password(Tools ›Security› Unset Database Password). A dialog box will appear Remove database password(Unset Database Password).
  4. Enter the current database password.
  5. Click the button OK.

Linking to Password-Protected Database Tables

A password is required to link to the tables in a password-protected database. If the password was specified correctly, it is saved along with other table reference information. Anyone working with a database with linked tables can then open those tables without specifying a password. If the password for the secure database is changed, the next time you open the database containing linked tables, you will be prompted for the password.

Comment
Microsoft Access saves the password unencrypted in the database that contains the linked tables in the secured database. If it hurts your database security, do not use password protection. Set up user-level security to restrict access to database objects
.

The addition of a password to restrict users who can open the database provides partial protection for the database. Microsoft Access stores the database password unencrypted. If this compromises the security of the password-protected database, do not use a password. Instead, you need to define user-level security.

    Close the database. If the database is open to the public on the network, make sure everyone else has closed it.

    Back up your database and store it in a safe place.

    On the menu File select team Open.

    Click the arrow to the right of the field Folder, select the drive and folder where the Microsoft Access database file is located, and click the file's icon.

    Click the arrow to the right of the button Open, select option Monopoly and open the database.

    On the menu Service select team Protection and subcommand Set database password.

    Enter your password in the field Password.

    Confirmation and then click OK.

The password is now set. The next time you open the database, a dialog box appears in which you must enter the password.

Notes (edit)

    If a table from a password-protected database is linked, then when the link is established, the password is stored (placed in a temporary buffer) in the database to which the table is linked. This will allow anyone to see your data.

Setting a password in a Microsoft Access project (.Adp)

Create a Microsoft Access project file (.adp).

    Close the Microsoft Access project file. When working in multiplayer environment, make sure that the project file is closed by all other users.

    Select from the menu Service command Utilities and then the command Create ADE file.

    In the dialog box Database to save as ADE select the project file you want to save as an .ade file and click Create ADE.

    In the dialog box Saving the ADE file as specify a name, drive and folder for the Microsoft Access project.

Unlike Microsoft Access database you cannot protect forms, reports, or macros with user-level security in a project, and you cannot set a password on a Microsoft Access project file (.adp). To protect objects on a form or report, you can hide these objects in the database window, or configure run options. To secure access to form and report layouts in a Microsoft Access project, you can set launch options or save the Microsoft Access project as an .ade file. Use startup options to secure access to macros in the project file. The data access page can be protected using the operating system file and folder protection. To protect your Visual Basic for Applications program, you can convert the project file to an .ade file, or set a password.

Change password in Microsoft Access project (.Adp)

If the MicrosoftAccess project (.adp) is connected to a Microsoft SQL Server 6.5 (or later) database protected by SQL Server, you can change the login password directly in Microsoft Access.

    Open a Microsoft Access project file or switch to the database window to open the project.

    On the menu Service select team Protection and then the command Set password for login.

    Enter your current password in the field Current Password.

    Enter your password in the field New password.

    To confirm the password, enter it again in the field Confirmation and then click OK.

Now the password has been changed and Microsoft Access re-establishes the .adp connection with the new password. The next time you open the project, a dialog box opens in which you must enter a password.

The easiest way to protect yourself is to set a password to open the database (.mdb). Once a password has been set, each time the database is opened, a dialog box will appear asking for the password. Only those users who enter the correct password will be able to open the database. This method is quite secure (Microsoft Access encrypts the password, so you cannot access it when you read the database file directly), but it only works when you open the database. Once the database is opened, all objects are available to the user (until the other security types are defined, described later in this section). For a database that is shared by a small group of users or on a stand-alone computer, setting a password is usually sufficient.

To set a password

  1. Open the database file in exclusive mode. For this
  • In an Access app, run the command File / Open.
  • Select the database file.
  • In the Open button, select the Exclusive mode.
  1. Execute the command in the menu Service / Security / Set database password.
  2. Set a password and confirm it.

To remove the database password

  1. Open the file in exclusive mode
  2. Run the command Service / Protection / Delete Database Password.

Note! Do not use a database password if you intend to perform database replication. Replicated databases cannot be synchronized if a database password is set.

Application protection

You can protect your application from accidental or intentional damage by end users by hiding database objects in the database window. Use application launch options to control the appearance and behavior of an application, and to protect menus and command bars.

Hiding objects

  1. In the main window of the database, select the object you want to hide.
  2. Click the button Properties on the toolbar - the properties window of the selected object will open.
  3. Check the box hidden and press the button OK..
  4. To show all hidden objects, select the command Parameters on the menu Service, open the tab View and check the box hidden objects... Hidden object icons will have low contrast.
  5. To re-display hidden objects, repeat steps 1-3, but in step 3 uncheck the box hidden.

Hiding tables and relationships in the data schema

  1. Open the data schema ( Service / Data Schema).
  2. Right-click on the object (table image) and select the command Hide the table.

Securing Database Objects at the User Level

The most flexible and common way to secure a database is called user-level security. This protection method is similar to that used on most networked systems. The two main reasons for using user-level security are:

  • protection of the application from damage due to unintentional changes by users of tables, queries, forms, reports and macros on which the application depends;
  • protection of confidential information in the database.

When starting Microsoft Access, the user is required to identify themselves and enter a password. Within a workgroup file, users are identified as members of the group. Microsoft Access creates two groups by default: Administrators (the Admins group) and Users (the Users group). Definition of other groups is also allowed.

While it is difficult to set up user-level security for most databases, the Security Wizard can help you quickly and easily secure your Access database. Moreover, by using common protection schemes, the wizard allows you to reduce or even eliminate the need to use the Protection command on the Tools menu.

After you run the Security Wizard, user and group account permissions in a workgroup can be assigned and removed for the database and its existing tables, queries, forms, reports, and macros. The default access permissions assigned to newly created database objects can also be set.

Groups and users are granted access permissions that determine their ability to access each object in the database. For example, members of the Users group may have permissions to view, enter, or modify data in the Customers table, but they will not be allowed to modify the structure of that table. The "Users" group can only be allowed to view data in the table containing information about orders, and not have access to the "Payroll" table. Members of the Admins group have permissions to all objects in the database. You can set up a more ramified management structure by creating your own group accounts, granting these groups the appropriate permissions, and adding users to groups.

If the administrator group and the user group are sufficient for the protection system, then there is no need to create groups. You can use the standard groups "Admins" and "Users". In this case, you must assign the appropriate access permissions to the standard "Users" group and add additional administrators to the standard "Admins" group. Each new user is automatically added to the "Users" group. Typical access permissions for the Users group might include Read Data and Refresh Data for tables and queries, and Open / Run for forms and reports.

If a more ramified management structure is required for various user groups, it is possible to create new groups, assign different sets of access permissions to groups and add new users to the corresponding groups. To make it easier to manage access permissions, we recommend that you assign access permissions to groups only (not individual users) and then add users to the appropriate groups

Note.

For more information about Microsoft Access security, see Microsoft Office 2000 / Visual Basic Programmer "s Guide.

Protection wizard steps

  1. Create a workgroup file.
  2. The file name is set (by default Secured. Mdw), the code (by default it is generated randomly).
  3. The database objects to be protected are marked (by default, all objects are protected). To unprotect an object, uncheck the corresponding checkbox.
  4. Types of groups with different access levels and their codes are assigned (by default, they are randomly generated). The types of groups to be included in the file are marked with a checkbox.
  5. You can set some (but not all) permissions to the Users group, which is included by default in every workgroup file.
  6. Users are added to the workgroup file - name, password, code (by default, it is generated randomly).
  7. Each of the assigned users is included in a certain group with the corresponding access level.
  8. Specifies the name of the backup (unprotected) copy of the database.

Protection in a multi-user environment

Database security in a multi-user environment has three aspects.

The first is to prevent users from replicating the database. Database replication allows the user to make a copy of a shared database, as well as add fields and other changes to the current database.

Secondly, the prohibition on setting and changing the database password. If a password is set on the common database, then no one else, not knowing the password, will be able to open the database.

Third, it protects against changes to launch options that define properties such as custom menus, custom toolbars, and the launch form.

If the shared database does not have user-level security, you cannot prevent users from making such changes. The Security Wizard sets up user-level security for the database, which allows you to control access to specific tools and determine how database objects can be used. When setting up user-level security, the user or group to replicate the database, set the database password, and change startup options must have the same access permission as the administrator. After you run the Security Wizard, only members of the Admins group of the current workgroup have administrator privileges.

If user-level security is already in place and the user or group currently has permission to access the database that matches the administrator's authority, removing the permission will prevent the user or group from making changes. You can assign the appropriate access permission to a user or group to enable them to perform these tasks. It is not possible to independently control the availability of each task.

Configuring launch parameters for Access DBMS

It is possible to designate the form that will be displayed when the database is opened, prohibit or enable customization of toolbars or use of context menus, and set some other launch parameters.

  1. On the Tools menu, select Startup Options.
  2. Select the options you want or enter the values ​​you want.

    Note.

    You should not combine the setting in the launch parameters of the form that opens when the application is launched and the macro autoexec to open the form at startup.

Selecting Options in the Launch Options Dialog Box

  1. Startup options apply to the current Microsoft Access database or Microsoft Access project.
  2. When you select an option in the Launch Options dialog box, the value of the Access database or Access project property associated with the option is automatically set. Click the button to view a list of these properties.
  3. Properties that correspond to launch options do not override property settings for a particular toolbar, menu bar, shortcut menu, form, or report. For example, the Menu Bar and Shortcut Menu options in the Launch Options dialog box do not override property values ​​for specific forms or reports that have a custom menu bar or shortcut menu. Therefore, when you open a form or report, Microsoft Access displays the custom menu bar attached to that form or report, rather than the global menu bar specified in the Run Options dialog box.
  4. You can use the Launch Options dialog box instead of or in addition to a macro autoexec ... Macro autoexec runs after the startup parameters take effect, so in the macro autoexec do not include macros that can change startup parameters. For example, if a form is specified in the Form / Page Output box of the Launch Options dialog box, and a macro autoexec When the Open Form macro command is called, first the form specified in the Launch Options dialog box will be opened, followed immediately by the form specified in the OpenForm macro command.
  5. In Access, if user-level security is defined for the database, you can prevent users from changing settings in the Startup Options dialog box. To do this, ensure that users cannot obtain administrator rights to access the database.
  6. You can bypass the startup option settings by holding down the SHIFT key while opening the database.

Working with different versions of Access

Sometimes a user creates a database in one version of Access, and then it becomes necessary to view it in another version of Access (either created earlier or created later).

In doing so, consider the following:

To be able to edit the database, you need to convert the file to the required version of the Access DBMS.

Converting a Database to a Previous Version of Access Database (Downgrade)

  1. Execute command Service / Utilities / Convert Database / to Previous Version of Access.
  2. During the conversion phase, you will be prompted to enter a name for the new database.

Converting a Database to a New Version (Upgrading)

  1. At the opening stage, a message will appear prompting you to select one of the options
  • Convert database
  • Open for viewing only.
  1. Select the Convert database radio button and specify a new name for the database and a folder.

Files created in Access 2000 are opened in Access 2003 for viewing and editing.

A user account password is defined to prevent a user from connecting under another user's account. MS Access default assigns a user account Admin and any new user accounts created in the workgroup, empty passwords.

Attention! If the password is lost or forgotten, it will be impossible to recover it. Therefore, you should store it in a safe place. To gain access to the database, a user who has lost their password must contact administrator(group member Admins the workgroup in which the account and password were created) to remove the password.

For create a password the user needs:

1. Start MS Access using the workgroup in which the user account is stored, and log into it using the account for which you need to create or change a password.

2. Open the database.

3. On a tab in a group Administrator select team

4. On the tab change Password leave the field Current Password empty if the account did not previously have a password. Otherwise, enter in the field Current Password Old Password.

5. Introduce New password in field New password.

6. Re-enter New password in field Confirmation and press the button OK(fig.11.18).

Removing the password of a user account

To complete this procedure, you must enter the database using the account of a group member Admins.

1. Launch MS Access using working group file where the user account is stored.

2. Open the database.

3. On the tab Working with Databases in the Ribbon in a group Administrator select team Users and Permissions - Users and Groups….

4. On the tab Users enter the user account name in the field Name.

5. Press the button Remove password(fig. 11.19).

6. Repeat steps 4 and 5 to remove other passwords, then press the button OK.



Access permissions

Permissions- a set of attributes that determine the user's rights to data or objects in the database.

There are two types access permissions:

1. Explicit - if they are directly assigned to a user account. Such permissions do not affect the permissions of other users.

2. Implicit - access permissions assigned to the group account. A user included in such a group gets all the permissions granted to the group. Removing a user from this group removes all permissions assigned to that group.

When a user attempts to perform any operation on a protected database object, his current permissions are determined by a combination of explicit and implicit access permissions. At the user level always act minimum restrictions of imposed explicit permissions for the user and for all groups to which this user belongs. Therefore, the simplest way to manage a workgroup is to create new groups and define access permissions for those groups, not individual users. You can then change permissions for individual users by adding users to groups or removing them from groups. In addition, if you need to grant new permissions, they are granted to all members of the group at once in one operation.

Change the permissions of other users on individual database objects can the following users:

Group members Admins defined in working group file which was used to create a specific database;

· owner object;

· any user that received on this object administrator permissions.

In some cases, users who do not have permission to perform any action have the ability to assign them to themselves. This situation occurs for a user who is a member of the group. Admins or owner object.

The person who created the table, query, form, report, or macro is owner of this object. In addition, a group of users who can change permissions in the database can also change the owner of objects or recreate these objects, which is an alternative way to change the owner of objects. To create an object again, it is enough to import or export this object to another database or make a copy of the object. This technique is the simplest way to change the owner of objects, including the entire database.

Administrators and owners are essential because they are granted permissions that cannot be revoked.

1. Administrators(group members Admins) can always get all the permissions on objects created in the workgroup.

2. Accounts that are owners tables, queries, forms, reports, or macros can always get all permissions to access these objects.

3. An account that is owner DB, can always open DB.

Since user accounts Admin are exactly the same for all instances of MS Access, the first step in organizing the protection system is to define the accounts administrator and owner(or a single account that is both administrator and owner). After that, you should delete the user account Admin from the group Admins... If you don't, any Microsoft Access user will be able to connect to the workgroup using an account Admin and to get all permissions to access tables, queries, forms, reports and workgroup macros.

Into the group Admins it is allowed to add an arbitrary number of accounts, however the owner of the database there can be only one account - the one that was active when the database was created, or the one that was active when the owner rights were transferred by creating a new database and importing all objects from the original database into it. However, group accounts can own tables, queries, forms, reports, and database macros.

Only user accounts can be used to log into MS Access; you cannot log in with a group account.

Accounts created for database users must be saved in the file of the workgroup to which users will join to work with the database. If a different workgroup file is used to create the database, you must change it before creating the accounts.

Need to create unique passwords for accounts administrator and users... A user who connects with an administrator account will always be able to get all access permissions to all tables, queries, forms, reports and macros created in the workgroup. A user who connects using an owner account will always be able to get all permissions to access objects belonging to this owner.

After you create user and group accounts, you can view and print their diagrams. MS Access prints a Workgroup Accounts report showing the groups to which each user belongs and all the users in each group.

Top related articles