Password Coding On Form

4

4Ankit

Hey all,

i am developing a switch board and want some secuirty on this switch
board to certain options that are availble to users. For example some
options such as view customers,view stock are open to all users. But i
want some secuirty on certain forms which can be accessable via the
switchboard. For example a prompt screen comes up when certain
options(such as employee details) are clicked asking for a password for
entry. Any information would be very helpful.

Kit
 
R

Rick B

The normal way to handle this is to set up user-level security and give the users access to the objects and actions you'd like. When the user opens the database, they will be asked for their UserID and Password. After they enter that, the database will open with the appropriate security.

The method you mention forces all your higher-level employees to enter a password everytime they want to do something - Yuck!

Also, building your own security leaves too much room for work-arounds and back doors. It is also much more difficult and code-intensive than using the security already provided by Access.

Now, User Level Security is not easy to set up the first time. It is very important that you follow every single step in order. I would probably make a backup copy of the database, read the instructions from start to finish, then dive in. After you are done, test test test! Make sure you can't open the file on a PC that does not have your workgroup file, for example.

Security
Security FAQ

http://support.microsoft.com/?id=207793



The Security Whitepaper is also worth reading to help you understand.

http://support.microsoft.com/?id=148555



Joan Wild:

www.jmwild.com/AccessSecurity.htm



Lynn Trapp

http://www.ltcomputerdesigns.com/Security.htm
 
D

Dirk Goldgar

Hey all,

i am developing a switch board and want some secuirty on this switch
board to certain options that are availble to users. For example some
options such as view customers,view stock are open to all users. But i
want some secuirty on certain forms which can be accessable via the
switchboard. For example a prompt screen comes up when certain
options(such as employee details) are clicked asking for a password
for entry. Any information would be very helpful.

The most secure way of controlling access and permissions is to apply
user-level security (a.k.a "workgroup security"). All users then have
to login with username and password when they start your application;
after that, permissions to various objects are automatically controlled
by user or user-group (however you assign them when you secure your
application) without your having to make your own password dialog. You
can also show or hide various controls, if you want, by using code that
checks the current username (returned by the CurrentUser function) or by
checking whether the current user is a member of a particular user
group.

This kind of security *can* be broken, but it's nothing like as easy as
most home-grown security measures.

That said, user-level security is tricky to implement correctly, and
requires that you distribute a workgroup (.mdw) file with your
application. The workgroup file contains the definitions of the users
and groups. To add a new user requires adding the user to the "master"
..mdw file and sending new copies out.

An alternative is to secure things by network user ID. You can get the
network user ID via a call to the Windows API. That's not as secure,
since you have to either hard-code user IDs or maintain a table of them,
which is thus exposed to the world. However, then the user doesn't have
to enter a separate password to use the features of your application --
they logged in to their workstation, and that's enough.

Finally, you can, as you suggested originally, have your own password
form -- or even a simple call to the InputBox function -- to get a user
to enter a password whenever you want to authorize a particular
activity. Then you can check the password entered against either a
hard-coded value or look it up in a table. Either way, the password is
not going to be very secure at all unless you take complicated measures
to encode it, and it may be annoying to the authorized users to be
repeatedly prompted to enter a password as they go about their work.

Sorry, I know I didn't really answer your question, but I thought it a
good idea to make sure you considered the alternatives.
 
4

4Ankit

thnx for the info, guess tehre aint no real easy way to protect a
database then hehe. Well il have to learn permissions and access
groups, should be fun lol . Thnx :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top