473,583 Members | 4,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User-Level Security: Prevent Default Access

21 New Member
I have an access database that I have secured using ueser-level security. I have my own logon in the Admins group. I have also removed Admin from the Admins group so that the standard end-user can't access the program. I have also removed Open/Run access to the Database from the Users group. This has provided correct security for the database.

Here's my one big problem:

All someone has to do is go up and join the default "Security.m dw" workgroup information file, and then they can open the database and do whatever they want without a password.

I thought that removing permisions from the Users group and removing Admin from the Admins group would help with this, but is there a way to make it so that people cannot open my file using any other workgroup information file than the one I choose?

I have made a shortcut that defaults to the workgroup information file I want, but that doesn't stop them from just changing their workgroup information file later.

Any knowledge is most appreciated.
Oct 2 '07 #1
1 2335
Luke Bailey
21 New Member
I have developed a solution to this problem for those who are interested in the future. It provides enough security for my needs however, someone who REALLY knows what they're doing with user-level security access and workgroup information files may be able to crack it.

After you have secured your Access database do the following:

1. Create a Shortcut with Target:

“path to MSACCESS.exe.” “path to file.mdb” /WRKGRP “path to file.mdw”

(example: Target: "C:\Program Files\Microsoft Office\OFFICE\M SACCESS.EXE" "D:\My Databases\MyDat abase.mdb" /WRKGRP "D:\Applica tion Data\Microsoft\ Access\MyDataba seSecurity.mdw" )

2. Create a VBA macro called “Startup()” and use the following code:
Expand|Select|Wrap|Line Numbers
  1. Public Sub Startup()
  2. If DBEngine.SystemDB Like "*<YOU WRKGRP INFO FILE>.mdw" Then
  3. Else
  4.     MsgBox "Please open this program using the provided shortcut.", vbCritical, "Open Via Shortcut"
  5.     Application.Quit (acQuitSaveNone)
  6.     Exit Sub
  7. End If
  8.  
  9. End Sub
  10.  
Insert the name of your workgroup information file. In the example given above I would type
Expand|Select|Wrap|Line Numbers
  1. "If DBEngine.SystemDB Like "*MyDatabaseSecurity.mdw"
  2.  
3. Create a VBA function to call your startup macro
Expand|Select|Wrap|Line Numbers
  1. Public Function StartMe()
  2. Call Startup
  3.  
  4. End Function
  5.  
4. Create an “AutoExec” Macro in Access (an Access Macro). Have it RunCode, and reference your StartMe function so that it will run your Startup code when the database opens. This macro must be saved as “AutoExec” to run on startup

5. Disable the AlloyBypassKey functionality in access with the following code (run the Sub once. It will be effective starting the next time you open the database):

Expand|Select|Wrap|Line Numbers
  1. Sub SetBypassProperty()
  2. Const DB_Boolean As Long = 1
  3.     ChangeProperty "AllowBypassKey", DB_Boolean, False
  4. End Sub
  5.  
Expand|Select|Wrap|Line Numbers
  1. Function ChangeProperty(strPropName As String, _
  2.     varPropType As Variant, _
  3.     varPropValue As Variant) As Integer
  4.  
  5.     Dim dbs As Object, prp As Variant
  6.     Const conPropNotFoundError = 3270
  7.  
  8.     Set dbs = CurrentDb
  9.     On Error GoTo Change_Err
  10.     dbs.Properties(strPropName) = varPropValue
  11.     ChangeProperty = True
  12.  
  13. Change_Bye:
  14.     Exit Function
  15.  
  16. Change_Err:
  17.     If Err = conPropNotFoundError Then ' Property not found.
  18.         Set prp = dbs.CreateProperty(strPropName, _
  19.             varPropType, varPropValue)
  20.         dbs.Properties.Append prp
  21.         Resume Next
  22.     Else
  23.         ' Unknown error.
  24.         ChangeProperty = False
  25.         Resume Change_Bye
  26.     End If
  27. End Function
  28.  

SUMMARY: After you have run the disable bypass code then you can reopen your database. The end result is that if anyone is using a workgroup information file that is different from your own, the database will request that they open the database using the shortcut you provided them (the one that points to your workgroup information file) and shutdown Access. The disable bypass makes it so that people cannot hold down the SHIFT key to bypass the startup macros.

As you can see, the makes it so that your database requires your workgroup information file to run. However, you can probably also see one problem with this solution...if someone knew what they were doing with workgroup information files and permissions, then they could crack it. I think its save to say, however, that if you require more security than this (you have a risk of someone going to all that trouble) then you should probably be using SQL Server or something with more security than Access.

Any other information/comments/responses that will help me expand my knowledge in this area are much appreciated.
Oct 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1803
by: Wayne Gibson | last post by:
Hi all, Please ignore the other post.. The cat jumped on the machine and sent it before I could stop it!! Was wondering if anybody has expericence this problem.. I am writting an application in C# using windows forms, to create windows user profiles and then updating the registry information for the new profiles. I have managed to...
7
908
by: Todd Beaulieu | last post by:
Hello, I'm using the configuration block to store user settings in the app.config file. As this exe will reside on a network drive, I can't have users trying to update the master app.config file. I want each user to read/write to a file in their user directory. Does anyone know how to do this?
5
2064
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me that he wants me to do something through which only one user can login using any given account name. I mean to say, for example, when a user...
1
7556
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a dropdown in UC1 _________________________ 1) MainPage_Load 2) User Control_1 Load
17
2099
by: Alphonse Giambrone | last post by:
I am building a web app for users to add/edit data. They may add/edit several records during a session. When they are done (not necessarily immediately, could be 10 or more minutes later), I need to send an email with some summary info of what was added/edited. I can keep track of the records by using the sessionid or user's login, but how...
1
2233
by: Demetri | last post by:
I'm trying to determine if we want to use panels or user controls for our pages. Our primary concern is performance, page loading and posting speed. To illustrate my question, lets use the Customer Orders scenario: Problem: User needs to view orders and and edit, add, save on one page called Orders.aspx. To begin with the page contains a...
0
3925
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something like this is a bug or that .NET doesn't support what I trying to do. I hope that one that is is microsoft certified read this because this must be a...
3
2787
by: Terry Olsen | last post by:
I'm trying to add a domain user to a local group using the code below: Dim LCL As New DirectoryEntry("WinNT://" + Environment.MachineName + ",computer") Dim DOM As New DirectoryEntry("WinNT://us.ups.com") Dim DOMUSR As DirectoryEntry = DOM.Children.Find("USERID", "user") Dim LCLGRP As DirectoryEntry = LCL.Children.Find("LOCAL_GROUP",...
1
1960
by: Carlettus | last post by:
Dear All, sorry but I'm not sure if this is the right place to post my problem. I was using the following asp code to create users in Active Directory. Suddenly, and I don't know the reason, users are created but the account is disabled (see the flag User.AccountDisabled = False ). There is also another problem even if the user does not exist...
0
3209
by: rbukkara | last post by:
Hi, I have got the following error while trying to add a user in the LDAP Directory. javax.naming.NameNotFoundException: ; remaining name 'uid=vassila,ou=People,dc=cs,dc=uno,dc=edu' I have given all the attributes which are needed, for the user, in the code and also the proper path where the user has to be added. Please have a look at my...
0
7825
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8179
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5700
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5372
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3841
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1431
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1155
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.