473,941 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Username & Password Capture

132 New Member
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 2641
ADezii
8,834 Recognized Expert Expert
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
37748
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 directory there is a .htaccess file that looks like this: AuthType Basic AuthName "someuser" AuthUserFile "/home/mydirectory/.htpasswds/secretDocs/passwd" require valid-user
4
6091
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 this: private static final int DEFAULT_MINIMUM_LENGTH = ??????
2
2468
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
2562
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 internet, they have to login. I want to be able to capture that login versus their Windows login because I need to know who they are from any computer rather than only their computer. Any ideas? Thanks
11
3644
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 ProcessStartInfo("osql",""); psi.RedirectStandardInput = false;
0
1193
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 code I m able to download files from that url using "DefaultCredentials" but i want to use password and username to access resources if tht url contains. & if for tht specific url if user enters wrong username & password so tht he must not able...
1
1652
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 code I m able to download files from that url using "DefaultCredentials" but i want to use password and username to access resources if tht url contains. & if for tht specific url if user enters wrong username & password so tht he must not...
0
3008
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. Java Client application code: HttpClient httpclient; httpclient = new HttpClient();
3
19660
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 password at the terminal. Is there any way to do this non-interactively? To hardcode the user/ pass into the script so I can get the page automatically? (This is not a cracking attempt, I am trying to retrieve a page I have
0
9964
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11529
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10659
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9858
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8218
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4908
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
2
4447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3505
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.