Archives: pcpress
Purpose
The purpose of this document is to explain the Microsoft Access security model to developers and potential administrators of secured applications. By delving into the internals of Microsoft Access security, we hope to give you a more intuitive feel for how the product will behave under different scenarios. This paper does not discuss security programmability -- that's covered in "Building Applications".
How can Security Help Me?
There are 3 main user problems that Microsoft Access security helps solve: 1) protect the intellectual property of developers' code in Microsoft Access applications, 2) prevent users from inadvertently breaking applications by changing code or objects on which the app depends, 3) protect sensitive data in the application. If you build Microsoft Access applications and face any of these problems, then this paper is for you.
The Basics: User-Level Security vs. Share-Level Security
Unlike most other PC security models, Microsoft Access provides User-Level Security rather than Share-Level security. This means that users are "authenticated" when they start Microsoft Access by logging on with a password. Specific permissions are granted to users and groups on specific objects. By contrast, share-level security means that passwords are associated directly with permissions on objects, (not with people), and that any user who knows a particular password can perform that action.
For example, suppose you have a Salary table, and that you have two groups of people on your system: Managers, who can update the table, and Payroll personal, who can view but not update the table. In a user-level system, such as Microsoft Access, you assign update permissions to the Managers group and read permissions to the Payroll group. Then you make sure that the people logging onto your system are enlisted in the appropriate groups. The individuals manage their own passwords, and their passwords are used to verify their identity rather than having any direct effect on their permissions. In a share-level security system, such as Paradox, you assign a read-only password to table, and a read-write password to the table. Then you tell all your managers the read-write password, and all the members of your payroll department the read-only password.
It's not our purpose to compare the relative merits of the two approaches, just to explain the differences from an administrator's perspective. If you've never built or administered a user-level security system before, the important thing to remember is that there's no such thing as a permission on an object that exists all by itself -- permissions on objects are always granted to Users and Groups. In a Microsoft Access database, it doesn't make sense to say, "the Salary table has read data permissions on it" because no user is indicated. It does make sense to say "the Managers group has read data permissions on the Salary table."
How Does Security Work?
In a nutshell, security functions as follows: Permissions are assigned to Users and Groups on objects. When a user starts up Microsoft Access in a secure environment, she logs on, usually with a password. Microsoft Access checks and remembers all the groups to which that user belongs. Every time the user tries performs an action on an object, such as open a form, browse a table, or modify a query, Microsoft Access checks to see if the user, or any of the groups to which she belongs, have the necessary permission. If so, Microsoft Access performs the action. If not, Microsoft Access tells the user that she doesn't have permissions to perform the requested operation, and the operation fails.
When is Security "On"?
It's important to realize that Microsoft Access Security is always "On" - that is, every time a user performs any action, Microsoft Access first checks to make sure the user has permissions to perform that action. However, most Microsoft Access users never realize they are logging on and never see a security-related message. How does this happen? The illusion that security is not "turned on" is created by granting full permissions, by default, to the Users group (all users) on all objects, and by automatically logging on each person as a default user (Admin) without displaying a logon dialog. Until someone takes explicit action to expose the security subsystem, most users will never notice that it exists. This allows Microsoft Access to be extremely secure, with no "backdoor" modes of operation, but still keeps security virtually invisible to users who don't need it.
Where is Security Information Stored?
Microsoft Access stores its security information in two different places. User and Group information is stored in the SystemDB specified in MSACC20.INI. The default SystemDB is SYSTEM.MDA. This database stores which users and groups exist, which users belong to which Group, logon passwords (encrypted, of course), and the internal security identifier (SID) for each user and group. In Microsoft Access parlance, a SystemDB defines a "Workgroup". On the other hand, all the permissions that users and groups have on the objects in a database are stored in the database itself. This way the permission information travels with the .MDB file in which the objects exist. The SystemDB is mainly consulted just at logon time. After a user's identity and group membership have been established, all permission checking is done against system tables within the user database itself. A single SystemDB can function as the Workgroup database for many application databases.
Each User and Group has associated with it a Security ID (SID). The SID is a binary string that uniquely identifies the User or Group. When a user logs on, Microsoft Access looks in the MSysAccounts table of the SystemDB for a user of the same name (case-insensitive). If a user with the same name is found, it then validates the password (case-sensitive). If the password matches, the SID of the user is retrieved and saved in an internal structure. The password is only used to validate the user when he logs on. It has no other effect on security.
By default, Microsoft Access first attempts to logon as the user Admin, with a blank password. If this logon fails, the user is presented with the Logon dialog. If a user name and password were specified on the command line (using the /User and /Pwd flags), Microsoft Access first tries to logon using that user name and password. If this logon fails, the user is presented with the Logon dialog. Once logged on, the user's SID is retrieved. Then the SIDs of all groups to which that user belongs are retrieved and saved in the same internal structure. These SIDs are used for all subsequent security operations within Microsoft Access.
Explicit and Implicit Permissions
There are 2 types of permissions: Explicit and Implicit . Explicit permissions are those given directly to a user. When they are granted, no other users are affected. Implicit permissions are those granted to a group. When they are granted, all users who are members of the group get the permissions of the group. Implicit permissions belong to the group, not the users . If a user is removed from the group, she no longer has the permissions of the group. If a user is added to the group, she gets all the permissions assigned to the group. If the permissions of the group are changed, all users in the group are affected.
When a user attempts to do something, she will get the least restrictive permissions of: 1) all the groups in which she is a member (her Implicit permissions), and 2) those given directly to her (her Explicit permissions.) Thus if the user Shirley has no permissions on the Salary table, but she is a member of the Payroll Group, which has Read Data permissions on the same table, Shirley will be able to read the table. If she is removed from the Payroll group, and she belongs to no other groups with permissions on the table, she will be denied access, the next time she tries to browse salaries.
Viewing Permissions
When you view a user's permissions on an object in the Microsoft Access Permissions dialog, you only see her Explicit permissions. To view her Implicit permissions, view the permissions of each group to which she belongs. There is no way through the Microsoft Access UI to look at a single user and see the union of all her explicit and implicit permissions on an object. Through DAO code, however, it is definitely possible to build such a UI.
Permissions are stored in the MSysACEs table in the user database. However, since the SID column of that table is no longer readable in Microsoft Access Version 2.0, and since system tables aren't directly updatable, there aren't many useful queries that can be run directly against that table. To view and update permissions programmatically, you need to use Access Basic Code.
Who Can Change Permissions?
Permissions on an object can be changed by anyone having permissions to do so. By default, the following users have this permission: members of the Admins group of the SystemDB in use when the database was created; the owner of the object, and anyone who has Administer permissions on the object, either explicitly or implicitly.
Database-Level Permissions
In Microsoft Access Version 1.0, users always had permission to open any database that wasn't protected by the file system. In Microsoft Access Version 2.0, there are 2 new database level permissions: Run/Open and Open Exclusive. Run/Open gives you a simple, clean way to lock unauthorized users out of your database entirely. Open Exclusive gives you the ability to prevent users from inadvertently locking each other out of multi-user applications by opening the database exclusively. One limitation from Microsoft Access Version 1.1 remains, however: Once a user has opened a database, there is still no way through the user interface to prevent a user from creating new objects in that database.
Each user can belong to one or more groups. users and groups share the same namespace -- you can't have both a group and user with the same name. Microsoft Access defines 2 default users: Admin, and Guest, and 3 default groups: Admins, Users, and Guests. You can also define your own users and groups. As mentioned before, each user and group is identified to Microsoft Access by a security identifier - a SID. Understanding how these SIDs are generated helps you understand how the model works.
Admin User
The Admin user is the default user account. If someone is using Microsoft Access and not logging on, they are using the Admin account. Admin is not very well named, as he has no particular administrative abilities. Since most users are logged in as the Admin user without ever knowing it, and since all users by default have permissions to objects they create, any objects that are owned by the Admin user or to which the Admin user has explicit permissions are unsecure.
SID: The Admin User's SID is identical across all installations of Microsoft Access and Microsoft Visual Basic. This means that even if nobody in your workgroup is using the Admin account (because you have password protected it), then all objects still owned by the Admin user, or to which the Admin user has explicit permissions are still open to anyone using their own copy of Microsoft Access or Microsoft Visual Basic. This is one of the most common misunderstandings in Microsoft Access Security administration. Fortunately, once the problem is understood, it's easily prevented.
Default Permissions: By default, the Admin account doesn't receive any permissions on new objects. However, when any user creates an object, his user account is automatically granted full permissions on this object by default. Since all users in unsecured environments log in as Admin, the Admin account usually has a lot of permissions. When it's time to secure your database, using the Security Wizard is the easiest way to remove those permissions.
Users Group
The Users group is the default group. All users always belong to the Users group. Thus any permissions that are assigned explicate to the Users group are available to all users in all installations of Microsoft Access, Microsoft Visual Basic, and any other application using the Microsoft Jet Database Engine. If you ever need to unsecure an object, simply assign permissions on that object to the Users group.
SID: The Users Group's SID is identical across all installations of Microsoft Access.
Default Permissions: By default the Users group gets full permissions on all newly created objects. This is the main mechanism Microsoft Access uses to "hide" security from the majority of users who don't need it.
Admins Group
Users who are members of the Admins group (note the 's') are the true administrators of a workgroup. They manage user and group membership, and have the power to clear users' passwords. There must always be at least one member of the Admins group at all times.
Default Permissions: The Admins group of the SystemDB in use when the database was created by default gets full permissions on all new objects in a database. More importantly, the Admins group's Administer permissions, the right to change permissions, cannot be revoked through the Microsoft Access UI. Even if you uncheck the Administer privileges checkbox in the Permissions dialog for the Admins group on an object, the permission remains. It is therefore very important to know and keep track of which SystemDB was in use when the database was created. To stress this point, italics are used throughout this document where it comes up.
SID: Since the Admins group is invested with so many capabilities, understanding how the Admins' SID is created is key to understanding the security model. In Microsoft Access Version 1.1, the Admins group's SID was created by the setup program by encrypting the User Name, the Company Name, and the serial number of the installation floppy disks. In the event that the SystemDB became lost or corrupted, users could recreate their Admins group by reinstalling from their original floppies. But this method created problems for users who installed from other media. In Microsoft Access Version 2.0 the setup program uses only the user's name and the company name as seeds for the Admins group's SID. Since these two strings are available from the Help menu, it is critical that users implementing security use the Workgroup Administrator to create a new Admins Group with a secure SID.
The Workgroup Administrator: will prompt for the a Name, a Company Name, and a Workgroup ID. It uses these strings as keys to the encryption of the Admins group SID. Thus it is very important to record these three strings (case sensitive) in a secure, off-sight location. If the SystemDB ever becomes destroyed or corrupted beyond repair, you can generate a new Admins group with an identical SID by running the Workgroup Administrator again, and entering the same exact strings. This will allow you to grant yourself permissions on all objects that were created when the old SystemDB was in effect.
Guest User and Guests Group
The Guest User and the Guests Group accounts exist primarily to give users in an unfamiliar workgroup a default account with which to log in. Their SIDs are identical across all installations. In Microsoft Access Version 1.0 , the Guests group was given read permissions on all objects by default. In Microsoft Access 2.0, this has been changed: by default, they receive no permissions on newly created objects.
Creating Your Own Users and Groups: SIDs, PIDs, and Passwords
Admins in a workgroup create new user and group accounts. They manage which users are members which groups. As mentioned above, each user is identified to Microsoft Access by its SID. SIDs are the only user information that Microsoft Access checks when deciding whether or not a user has permissions to perform an operation on an object. When you create a new user or guest account, you are prompted for a user name, and a PID - a personal identifier. The PID is NOT the Password! The user name and PID are fed to the encryption program that generates the SID for that account. The PID is a variable length, alphanumeric, human-readable string. The SID that Microsoft Access generates from the user name and PID is a 128-bit machine-readable number. If you feed in the same two keys again to the encryption program, you will get the same SID. This gives you the ability to recreate user accounts if your system database becomes corrupted.
For this reason it is critical that the user and group names and their PIDs be recorded and kept in a safe place. If there is ever a need to recreate the SystemDB, you will need the name and PID of each user and group that was in the SystemDB. Note that by using different PIDs, it possible for users and groups in different SystemDBs to have the same name, but they will actually be different accounts as far as Microsoft Access security is concerned because they have different SIDs.
Each user then manages their own password. Passwords have no effect on the user's SID, or on his or her permissions. They simply identify the user account to Microsoft Access. There is no built-in password aging in Microsoft Access, although you can write you own with Access Basic Code.
CurrentUser()
The CurrentUser() function in Microsoft Access Basic returns the name of the current user. This is not the same as the SID. It is possible for 2 users in different SystemDBs to have the same name but different SIDs. This can cause a problem if 2 people that are using different SystemDBs have the same name but different PIDs (and therefore different SIDs). For example, if you are using the CurrentUser() function to log activity, and both are using your database, the activity logging could be inaccurate. These are actually 2 different accounts, even though their user names are the same.
Ownership is an important part of Microsoft Access' security model. The SID of the user who creates an object is the owner of the object. The object's owner always has permission to assign permissions on that object, even if someone with Administer privileges has revoked his explicit permissions on that object. Unlike the administer privileges of the Admins group, this irrevocability is enforced by the Microsoft Jet Database Engine -- not the Microsoft Access user interface. Therefore it cannot be revoked through DAO code. It can only be transferred to another user.
There are two ways to transfer ownership of a object. The first is to change the owner through the user interface. The second is to recreate the object. This is usually accomplished by importing it or exporting into a new database. If you want to secure an entire database, this is easiest way to transfer the ownership of all the objects. It is also the only way to transfer ownership of the database object itself. You can do this easily with the Import Database command on the File Add-ins menu, or let the Security Wizard do it for you. Note that in order to recreate an object, the person doing the importing/exporting or copy/pasting must have permissions to read the object in the first place.
As mentioned above, the Admin and Guest users have the same SID in all SystemDBs. It is therefore critical to security that the Admin and Guest users NOT own any objects! If they do, anyone who has Microsoft Access who can open the database can give themselves permissions to those objects. To see who owns an object, open the Change Owner dialog under the Security menu.
Microsoft Access queries have a property called "Run Permissions", available through the Query Properties property sheet. This "property" is really a UI construct that maps to the "WITH OWNER ACCESS OPTION" clause of the .SQL property of the query. It can have one of two settings: "User's" or "Owner's". If set to User's, (the default) then nothing special happens -- the query executes normally. When set to Owner's, however, when the query is executed, only the permissions of the owner of the query are considered when attempting to access tables or queries on which the query is dependent. This very powerful feature allows you to build secure views on your data that can provide row- and column-level security for your users.
For example, suppose you have a secure database with an Employees table and a separate Salary table. Using owner-permission queries, and setting insert, update, and delete permissions separately on the underlying tables, you can build views on the two tables that allow one group to view, but not update the salary column, another to be able to view and update the salary column, and a third to only view the salary column if salary is less than a certain amount.
Previously, Owner Permission queries were not permitted to cross database boundaries, rendering them useless in situations were applications were developed with a split back-end / front-end topology using attached tables. In version 2.0, this restriction has been removed.
Only the owner of a query may save it if the Run Permissions property is set to Owner's. Even members of the Admins group of the SystemDB in use when the database was created can't save a query created by another user if the Run Permissions property is turned set to Owner's. It would be a security breach to do so. Note though, that anyone with Modify Definition permissions on the query can set the Run Permissions property to User's and successfully save the query.
Tip: Since only the owner of an Owner Permissions query can modify it's design, it used to be very inconvenient for developers working in groups to utilize these queries. Now, since groups can own objects, developers can transfer a query's ownership to a group, such as Developers. Then any member of the Developer's group will be able to edit the query and save changes.
Encryption is separate from Microsoft Access security. It only used to prevent someone from using a file or disk editor (such as Norton Utilities) from being able to read and write data in an .MDB file. Access reads and writes all data a page at a time. Pages are 2Kb in size. Encryption is done at the page level, not at the data level. That is, at the level that encryption is being done, there is no notion of what is on the page, only that there's 2Kb of data that needs to be encrypted and written, or read and decrypted. This implies that everything in an Access .MDB file is encrypted, including tables, queries, forms, indexes, etc. Access uses RSA Data Security Inc's RC4 algorithm for database encryption.
Given a database that isn't encrypted, it would be possible for a (very) knowledgeable person to use a disk editor to read the SID of the database owner or the SID of the Admins group in use when the .MDB was created. Given that SID, they could assume ownership of the database using the methods outlined above, and do anything they wanted with the database. For this reason, it is recommended that if you want to protect against such a person, you should encrypt your database. Because of this, databases secured by the Security Wizard are encrypted.
Only the creator (owner) of a database, or a member of the Admins group in use when the database was created, can encrypt or decrypt it.
Due to the overhead of encrypting and decryption, there is a performance degradation of approximately 10-15% in encrypted databases. Encrypted files are also essentially incompressible (via PKZip, Stacker, DOS 6 DoubleSpace, etc.)
There was a known and documented hole in Microsoft Access Version 1.x security whereby an unauthorized user (BadGuy) could read a SID from a user database, and paste it over a SID in the MSysAccounts Table in the SystemDB -- thereby masquerading as a different user. In order to tighten security in Microsoft Access Version 2.0, three changes were made: First, system tables were made non-updatable. Second, the SID columns in the MSysACEs and MSysObjects tables were rendered unreadable. Third, the file encryption algorithm was enhanced. Now, SIDs are readable by members of the Admins group only, and are not writable at all in version 2.0 systems.
However, Microsoft Access Version 2.0 can still run with a version 1.1 system database, which is still, of course, vulnerable to the same hole. This is so that sites can run in a mixed environment -- with some users running Microsoft Access Version 2.0 and other using Microsoft Access Version 1.x. Administrators of 1.x sites that are upgrading to 2.0 face a choice -- in order to prevent clever BadGuys from exploiting the 1.x hole in a to break into a secure 2.0 system, it is necessary to recreate your user and group accounts with the new longer PIDs and reassign permissions. If you don't, then it would be possible for the BadGuy to read a user's SID from an old version 1.x copy of the database, and paste it over their own account's SID using Microsoft Access Version 1.x and a version 1.x SystemDB. If the user's SID is recreated using Microsoft Access Version 2.0, however, then there is no way for the BadGuy to ever read that user's SID -- Microsoft Access Version 2.0 protects against reading SIDs. If you are not concerned with this scenario, (perhaps because you are using security to protect well-meaning users from messing up data or applications, rather than protecting yourself from BadGuys), then this step is not necessary -- Microsoft Access security will still work properly with the old SIDs. We recommend that you take this precaution now, but the choice is yours.
There is a wizard which helps automate this process. See the note on the security conversion wizard below.
When using the Microsoft Access 2.0 Upgrade disks to upgrade an existing 1.0 or 1.1 installation to 2.0, a new SystemDB is created. The old SystemDB is not changed in any way. If you want to use your old SystemDB, and your old SIDs, then simply use the Workgroup Administrator to join your old workgroup.
The Access Security Wizard is used to secure databases. It allows you to choose which object types to secure (Tables, Queries, Forms, Reports, Macros, Modules.) The selected object types are secured by revoking all permissions from the Users groups.
You install the Security Wizard with the Add-in Manager, available under the File / Add-ins submenu. Open the Add-in Manager, and select the Add New button. A file-open dialog will appear. Simply point it at the SECURE20.MDA file. The Add-in manager will copy the file into your access directory and make the necessary entries in your MSACC20.INI file. When you restart Microsoft Access, you will see Security Wizard, under your File / Add-ins submenu. To secure a database, log in as a user other than Admin or Guest who has read permissions on all objects and data in a database. Then open the database and invoke the Security Wizard by selecting this command.
Note: The SECURE20.MDA file and Microsoft Access 2.0 Security Wizard white paper (SECURE20.TXT) are available on TechNet CD2 in the SOFTLIB subdirectory as Application Note WX1051.EXE.
The Security Wizard will only run on Microsoft Access Version 2.0, but will work with databases in 1.0, 1.1, or 2.0 format. Databases created by the Security Wizard are always in 2.0 format.
The Security Wizard can take quite a while to run. For instance, securing NWIND.MDB on a 486/50 takes approximately 13 minutes. The About dialog gives more detailed information about what the Security Wizard does.
The Security Conversion Wizard helps you convert a version 1.x workgroup to version 2.0, and to update the permissions of databases created under the old workgroup. Install seccon20.mda, available from PSS, using the Add-in manager. Convert your 1.x user databases to 2.0 format with the File / Convert command. Then run the security conversion wizard and follow the directions. It will examine your 1.x workgroup database and prompt you for new PIDs for all users and groups in that database. Then it will build add the new user and group accounts to your new version 2.0 systemDB. This creates brand new accounts with brand new SIDs.
The next step is to assign permissions in your user databases to these new accounts and revoke them from the old accounts. The wizard does this for you. You must keep the old workgroup database around until you are sure that all user databases that were created under that workgroup have been converted to the new user accounts.
Securing an Existing Database
You've written an application using Microsoft Access---call it MYAPP.MDB. You've created all the objects while you were logged on as Admin (the default.) Now you want to "secure" the database. Here are the steps to follow to do so:
1. Make sure you are using a secure workgroup created with the Worgroup Adminstrator.
2. Install the Security Wizard using the steps above.
3. Choose Change Password from the security menu and give a password to the user Admin.
4. Create a new user and add him to the Admins group. For this example, the user is Joe.
5. Exit Microsoft Access and restart it, giving Joe as the user when the Logon dialog is given.
6. Open MYAPP.MDB
7. Invoke the Security Wizard by selecting the Security W izard command from the File / Add-ins submenu.
8. Select the object types to be secured.
The Security Wizard creates a new, encrypted, database, exports
all the objects from the current database, and properly secures
the selected object types by revoking permissions from the Users
group. It doesn't change the current database in any way. It recreates
attached tables and table relationships in the new db as well.
9. If desired, create any of your own groups and users, and give them appropriate permissions on all the objects in the new database. It is recommend that you assign permissions to groups, rather than individual users.
The new database is now secure. The only people who can get into the objects in MYAPP.MDB are those you gave permissions to in step 9, and anyone who is a member of the Admins group of the current SystemDB.
Unsecuring a Secured Database
You've followed the steps under Securing an Existing Database, above. Joe is the owner of the database and all objects in it. The Admins group of Joe's SYSTEM.MDA has permissions to change permissions on any object in the database. The goal here is to make the user Admin the owner of the database and all objects in it, and to give the Users group Full permissions on all objects. Remember, the SIDs of the Admin user and the Users group are constant in all SYSTEM.MDA's, so this will effectively give everyone Full permissions on all objects in the database, and make them the database owner as well.
1. Make a backup of MYAPP.MDB!!!
2. Start Microsoft Access, logging on as someone who has Read Data and Read Definition permissions on all the objects in MYAPP.MDB.
3. Open MYAPP.MDB.
4. Give the Users group Full permissions on all objects in the database.
5. Exit Microsoft Access and restart it logging on as the user Admin.
6. Create a new database (call it MYAPP2.MDB).
7. Import all the objects from MYAPP.MDB into MYAPP2.MDB.
Your database is now completely unsecured. Anyone who can get to the MYAPP2.MDB file has Full permissions on all the objects in it. The Admins group of the system database in effect when your new database is created will be the Admins group for that database.
Protecting Your Code
You've written Microsoft Access Basic code that you want to distribute, perhaps as an application or a Library database, but you don't want anyone to be able to read your code. The modules are in MYAPP.MDB, and were all created while you were logged on as Admin. Assuming that you're starting from a completely unsecure configuration, simply follow the steps under "Securing an Existing Database", above, choosing the Modules checkbox in step #7.
Your modules are now secured so that nobody except Joe and members of the Admins group of the current SystemDB can read the modules. All users will still be able to execute the code---there's no way to prevent someone from being able to execute code. If you give this database to a remote site with a different SystemDB, then members of the Admins group of that SystemDB will have no special permissions on any of the objects in your database. If you want to grant them special privileges, you can ship them a SystemDB with groups already set up, and simply have them add their own user accounts, or you can assign permissions to a group in your own SystemDB, and have the remote site generate a group with an identical SID by telling them the exact name and PID of the group that you've created on your SystemDB.
If you don't want users of your application to have to log on , but you still want to lock up your code, you can grant permissions to the user Admin for all objects that you want to be available to all users. Then users opening your database without logging on will be able to perform all actions to which you give the user Admin permissions.
Moving a Database to Another SYSTEM.MDA
You are Joe, and have written MYAPP.MDB and want to give it to Jane who is using a different SYSTEM.MDA. You want Jane to have complete administrative authority over your database. The problem is this: The Admins group of Jane's SYSTEM.MDA doesn't have any permissions on anything in MYAPP.MDB.
There are 2 variations of this scenario:
Variation #1: MYAPP.MDB is completely unsecured (the Users group has Full permissions on everything).
The situation here is as follows... The user Admin created MYAPP.MDB and all the objects in it, and is therefore the owner of everything. The Admins group of Joe's SYSTEM.MDA has permissions to change permissions on all the objects in MYAPP.MDB. The Users group (which has the same SID in all Microsoft Access installations) has Full permissions on all objects in MYAPP.MDB. Jane's SYSTEM.MDA is unsecure (the Admin password is blank, and there are no user accounts or groups.)
To give MYAPP.MDB to Jane, and have her get complete administrative authority over it, follow these steps:
1. Make a backup of MYAPP.MDB!!!
2. Start Microsoft Access using Jane's SYSTEM.MDA.
3. Create a new database---call it MYAPP2.MDB
This will establish Admin as the database owner.
4. Import all the objects from MYAPP.MDB into MYAPP2.MDB
This will establish the user Admin as owner of all the objects,
and give the Admins group of Jane's SYSTEM.MDA permission
to change permissions on all objects created in MYAPP2.MDB.
6. Rename MYAPP.MDB to MYAPP.OLD and rename MYAPP2.MDB to MYAPP.MDB.
Variation #2: MYAPP.MDB is secured using the steps under Securing an Existing Database.
To give MYAPP.MDB to Jane, and have the Admins group of her SYSTEM.MDA get complete administrative authority over it, follow these steps:
1. Follow the instructions under Unsecuring a Secured Database, above
2. Follow the instructions under Variation #1, above.
For all intents and purposes, Jane is now the "owner" of MYAPP.MDB and all objects in it, and Joe is just another user. Under both these scenarios, you can include the steps under Securing an Existing Database, above, as necessary to make the database secured under Jane's SYSTEM.MDA.
Additional Guidelines for Shipping a Secure Application
There is an intimate connection between each .MDB file and the SystemDB in use when the database is created. Members of the Admins group of that SystemDB will always have permissions to change permissions on any objects in the .MDB file. Thus it is impossible to protect your code from anyone who is in the Admins group of the SystemDB in use when the .MDB was created, and has a copy of the SystemDB. For this reason, you should NEVER release that SystemDB to anyone who you don't want to be able to read your tables, forms, modules, etc. Use the Change Workgroup utility to create a new SystemDB.