473,395 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Username & Password Capture

132 100+
I have an Access database I'd like to add a little security to. Is it possible to have a list of allowable usernames and multiple passwords associated with each username? Also, I'd like to capture the username and use it on various forms as they are updated by the various users. Any ideas??
Jul 11 '07 #1
1 2613
ADezii
8,834 Expert 8TB
I have an Access database I'd like to add a little security to. Is it possible to have a list of allowable usernames and multiple passwords associated with each username? Also, I'd like to capture the username and use it on various forms as they are updated by the various users. Any ideas??
  1. The following code will Print all Users and any Groups to which they belong to the Immediate Window. To retrieve the Password assigned to each User would be a daunting task to say the least, since it was no means meant to be easily obtained.
    Expand|Select|Wrap|Line Numbers
    1. Dim usr As DAO.User, grp As DAO.Group
    2.  
    3. 'Enumerate all Users in the Current Database
    4. For Each usr In DBEngine.Workspaces(0).Users
    5.   Debug.Print "  " & usr.Name
    6.   Debug.Print "    Belongs to these groups:"
    7.  
    8.   'Enumerate all Groups to which User belongs
    9.    If usr.Groups.Count <> 0 Then
    10.      For Each grp In usr.Groups
    11.        Debug.Print "      |----" & grp.Name
    12.      Next grp
    13.      Else
    14.        Debug.Print "    [None]"
    15.    End If
    16.    Debug.Print "-----------------------------------"
    17. Next usr
    OUTPUT:
    Expand|Select|Wrap|Line Numbers
    1.   admin
    2.     Belongs to these groups:
    3.       |----Admins
    4.       |----Users
    5. -----------------------------------
    6.   Creator
    7.     Belongs to these groups:
    8.     [None]
    9. -----------------------------------
    10.   Dick Clark
    11.     Belongs to these groups:
    12.       |----Users
    13. -----------------------------------
    14.   Engine
    15.     Belongs to these groups:
    16.     [None]
    17. -----------------------------------
    18.   Joe Schmoe
    19.     Belongs to these groups:
    20.       |----Users
    21. -----------------------------------
    22.   Lon Chaney
    23.     Belongs to these groups:
    24.       |----Users
    25. -----------------------------------
    26.   Roy Hobbes
    27.     Belongs to these groups:
    28.       |----Users
    29. -----------------------------------
  2. You can use the CurrentUser() Method to retrieve the name of the Current User of the Database (not to be redundant) as in:
    Expand|Select|Wrap|Line Numbers
    1. Debug.Print "The Current User of the Database is: " & CurrentUser()
    OUTPUT:
    Expand|Select|Wrap|Line Numbers
    1. The Current User of the Database is: Admin
Jul 11 '07 #2

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

Similar topics

9
by: deko | last post by:
I want to use htaccess for authentication on my php site since I only have a few users who need access to secure areas. So, I created a new directory off public_html (secretDocs) and in that...
4
by: Lobang Trader | last post by:
Hi all, I am trying to create a username and a password class. I would like to know what are the RECOMMENDED minimum and maximum length for both fields? These fields will be something like...
2
by: Z0gS | last post by:
How do I get the window username and password information so that I can imporsonate to access a remote file server using the UNC path using asp .net or c# code.
14
by: Brent Burkart | last post by:
I am trying to capture the Windows Authenticated username, but I want to be able to capture the login name that exists in IIS, not Windows. In order to enter my company's intranet through the...
11
by: gopal | last post by:
Hi, I am trying to call the OSQL utility from my C# console application and i am having problems i have the following code In Main method ProcessStartInfo psi = new...
0
by: gujarsachin2001 | last post by:
hello friends i m connecting to http or https url programatically through console application using follwoing methods of credentilas but if there is username & password for that url through this...
1
by: gujarsachin2001 | last post by:
hello friends i m connecting to http or https url programatically through console application using follwoing methods of credentilas but if there is username & password for that url through this...
0
by: sanbm79 | last post by:
Hi All, I am facing a problem in posting Web request with username and password credentials. I am working on migrating Java client application to .Net which will send request to Java servlet. ...
3
by: rodrigo | last post by:
I am trying to retrieve a password protected page using: get = urllib.urlopen('http://password.protected.url"').read() While doing this interactively, I'm asked for the username, then the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.