Security- disabling DB copies

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • garfieldsevilla
    New Member
    • Feb 2010
    • 37

    Security- disabling DB copies

    Hi, I have an Access 2003 DB that will be installed on XP home in a local club. Several members will be able to use this DB and I am concerned that someone might one day take a copy of the members data home with them on a pendrive.

    I can't stop file copying at the OS level, so I am thinking of scattering a few VBA lines to read hidden files in the system area and generate errors when the DB is run on another machine. I know its a game of cat and mouse but I believe 99% of the members would give up on the copy after a few errors..

    Has anyone done something similar or know of a better way?
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    I would suggest moving the data to a backend database and password protecting the folder the backend is in. You can also password protect the file itself.

    Comment

    • garfieldsevilla
      New Member
      • Feb 2010
      • 37

      #3
      Unfortunately, there is no backend- the database is installed on the club's only PC.

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        Originally posted by garfieldsevilla
        Unfortunately, there is no backend- the database is installed on the club's only PC.
        That doesn''t mean you can't split the backend out into another database.

        Just create a new database file and import all the tables into it. Password protect the new database file. Then replace the tables in the old database with links to the tables in the new database. Now all the data is stored in the new database which is password protected and the database all the users access is only a frontend with no data.

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #5
          Originally posted by garfieldsevilla
          Hi, I have an Access 2003 DB that will be installed on XP home in a local club. Several members will be able to use this DB and I am concerned that someone might one day take a copy of the members data home with them on a pendrive.

          I can't stop file copying at the OS level, so I am thinking of scattering a few VBA lines to read hidden files in the system area and generate errors when the DB is run on another machine. I know its a game of cat and mouse but I believe 99% of the members would give up on the copy after a few errors..

          Has anyone done something similar or know of a better way?
          You could have the Database on the Club PC read a specific String from the System Registry on that PC prior to opening. This String will only exist on the Club PC and no other, if it cannot read the Registry Value, do not allow the DB to Open as would be the case on any other PC. A savvy User, of course, could always Import or Link to the copied DB Objects.

          Comment

          • garfieldsevilla
            New Member
            • Feb 2010
            • 37

            #6
            ADezii, have you done something like this? Can you share any VBA code?

            The db is password protected but the problem is that there is at least one easy to use programme that can unlock an access DB. I like the idea of some VBA code to stop the DB from opening on another machine.

            Comment

            • ADezii
              Recognized Expert Expert
              • Apr 2006
              • 8834

              #7
              Originally posted by garfieldsevilla
              ADezii, have you done something like this? Can you share any VBA code?

              The db is password protected but the problem is that there is at least one easy to use programme that can unlock an access DB. I like the idea of some VBA code to stop the DB from opening on another machine.
              1. Declare the following Public Constant in a Standard Code Module. This CONSTANT represents the Unique String that must exist in the Registry of a PC before the Database will Open. You can, and probably should, change it to something more appropriate.
                Code:
                '******************************************************
                'Define your Unique String to Open the DB
                Public Const conOPEN_ID As String = "2356GGF66KKL"
                '******************************************************
              2. Execute the following code only ONCE. The exception to this Rule would be if and when you wanted to change the Password. This code actually writes the super-duper, top-secret, String to the System Registry at a specific location. Do not proceed if you do not see the Confirmation Dialog!
                Code:
                'Write this String to the Registry of the Club PC, ONLY ONCE, unless
                'you wish to change the Password in the future
                SaveSetting appname:="MyApp", Section:="OpenSesame", _
                            Key:="Password", setting:=conOPEN_ID
                  MsgBox "Registry has been modified!", vbInformation, "Registry Change"
              3. Place the following code in the Open() Event of your Start Up Form.
                Code:
                Private Sub Form_Open(Cancel As Integer)
                Dim strRetVal As String
                'appname, Section, and Key must match 'EXACTLY'
                strRetVal = GetSetting(appname:="MyApp", Section:="OpenSesame", _
                                        Key:="Password", Default:="YaDa")
                                        
                If strRetVal <> conOPEN_ID Then
                  MsgBox "You are not authorized to Open this Database on this PC!", _
                          vbCritical, "Illegal Access"
                            DoCmd.Quit acQuitSaveNone
                End If
                
                'If you get here, Password Identified, you are good to go!
                End Sub
              4. Simply stated, if the PC on which the Database resides contains the Unique String in the System Registry, it will Open, if not the User will be warned that he/she are not authorized to use the Database on their PC, and the Database abruptly Terminates.

              P.S. - There are work-around the above mechanism, but for obvious reasons, I'll not list them here. There are also other Methods to avoid intrusion upon the Data in the Database from other PCs which I also will not discuss. If you have any further interest, or questions, let me know and I'll address them in a Private Message to you, if warranted.

              Comment

              • garfieldsevilla
                New Member
                • Feb 2010
                • 37

                #8
                thank you, this is very complete.

                Comment

                • ADezii
                  Recognized Expert Expert
                  • Apr 2006
                  • 8834

                  #9
                  Originally posted by garfieldsevilla
                  thank you, this is very complete.
                  You are quite welcome.

                  Comment

                  Working...