Results 1 to 12 of 12
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    London, UK, England
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto Sign-on (Access 97/2000)

    A lot of the databases in my company are opened via workgroup information files, forcing the user to sign on. This is fine, but they get the log-on box for every database they open which can be annoying.

    I was thinking about writing something to automatically log the user on, so that workgroup permissions are applied in databases but the user hasn't got to sign-on - everything would happen behind the scenes. I was thinking an intermediate DLL or Activex EXE to take control of the 'database opening' procedure and fill in all DBEngine.DefaultUser & DBEngine.Password properties, before opening the database.

    I can do this programmatically using the DBEngine object with VB as a front end - no problem. However, I'm running into issues when Access is the front & back end. The DBEngine object has to have it's properties set before any subsequent DAO/ADO objects are created, so I can't create an Access.Application object and then open the database (the DBEngine object is an Application property that is set when you create the Application object!).

    Also, I can't just set the DBEngine properties then Shell Access, all permissions are lost like this...don't know if it's feasible.

    Has anyone else thought about this issue or know a way round it??

    Thanks

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Auto Sign-on (Access 97/2000)

    Yes - there's a very simple way of handling this - set up the users so they use a command line shortcut that invokes the correct system.mdw file for the secured databases, and run all other databases with the default system.mdw.
    Wendell

  3. #3
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    London, UK, England
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Sign-on (Access 97/2000)

    Yes, this is what we do for our DBs - but when you call like...

    "C:Program FilesMicrosoft OfficeOfficemsaccess.exe" DatabaseName /wrkgrp WorkgroupFile

    ...it will prompt the user to sign on? For the life of the Application object you can open other secured databases from within the application without having to sign on but the minute the application is terminated (& hence the DBEngine), you will be forced to sign on again?

    I'm trying to get round users having to see the sign on screen at all.

    Thanks

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Auto Sign-on (Access 97/2000)

    If you have followed the standard recommendations for securing a database, you have taken ownership of all objects away from Admin, and removed Admin from the Admins group.

    Why don't you give Admin rights to all objects you want "standard" users to be able to use? Then, everyone can open the database without logging in using the default unsecured System.mdw. You'd still need to log in using the secured workgroup file in order to change the design of objects etc., so you don't compromise the security of the database more than you do now.

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Auto Sign-on (Access 97/2000)

    Hans has suggested another alternative which would work as well. I was suggesting that you set the default workgroup to the one that Access creates on the local hard drive, and not use a workgroup shortcut for specifying those databases that don't need security active. But note that Hans made the point that your secured database may not be entirely secure if you haven't rigorously followed that steps for doing so. Finally, there are a number of reasons for using security beyond restricting them to certain functions. One of the most important is tracking who did what when. If you don't have security active, then all changes get attributed to Admin, which makes them pretty much useless.
    Wendell

  6. #6
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Sign-on (Access 97/2000)

    The shortcuts can also hold user and password information.

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Auto Sign-on (Access 97/2000)

    As Drew points out, there are also command line arguments for user/ and pwd/ that you can use in a shortcut to pass a login name and password to the application. One place you'll hit a snag with your shortcuts is if you don't include the full path and filename for the Access executable, the database file and the workgroup file.
    Charlotte

  8. #8
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    London, UK, England
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Sign-on (Access 97/2000)

    Thanks people, some good points here. The user/ and pwd/ shortcuts sound like the way to go for me.

    Thanks again.

  9. #9
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Auto Sign-on (Access 97/2000)

    One small qualification - if you have multiple people using the same machine, or if you are concerned about malicious behavior, taking the shortcut path will always record the same username for adds and changes. (Of course the password is readily visible too in the shortcut - you may not want to include it for users with strong capabilities.)
    Wendell

  10. #10
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    London, UK, England
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Sign-on (Access 97/2000)

    We have an application that delivers databases in the form of icons displayed in Listview objects, users just double click the icons to launch the database. All of the shortcut behaviour is hidden in the application, so they can't see what's happening.

    We're changing every user's password to a generic password that no-one else but admin will know, then I can just pick up the user name using API and pass that & the password in the shortcut 'behind the scenes'. Have tested & works a treat, so thanks to all at WOPR...!

  11. #11
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Nottingham, Nottinghamshire, United Kingdom
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto Sign-on (Access 97/2000)

    I can't pretend to have the knowledge of some of these guys but I go about this in a different way. My databases are MDEs and instead of securing them using mdws I use the fact that users have to have signed on to get access to the NT network. The startup form of each database checks the user's username against a list of valid users held within the MDE and shuts down if it can't match. I also therefore have a validated user to record in any history files.

    It is a workable system for a smallish office such as ours. And of course I might be missing something fundamental.

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Auto Sign-on (Access 97/2000)

    David,

    What you describe may be sufficient for your purposes, but it doesn't really protect the data - people can link to the tables in your databases from an arbitrary database, and so view and edit the data. They can also use SQL definition queries or DAO to modify the structure of tables, or delete tables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •