473,700 Members | 2,311 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Network database username problem

62 New Member
Hi all,

After several months of development (I was totally new to SQL, VBA and MS Access when I started) I finally have my database all squared away and operating exactly how I want. (With a great deal of help from you fine people at theScripts--thank you!) So the time finally arrived to put my form on the network and allow other people to begin using it. Much to my dismay, none of the users/workgroups I set in the database seemed to come along for the ride.

I created a new Workgroup Administrator file (cleverly named System1.mdw) and put it in the network drive with the database and set the database to look for that file, but it seems that this only affects me on my machine. Other users are not even prompted for a username and password, which needless to say causes some problems.

My security is minimal and primarily geared towards preventing unauthorized users from using several forms which modify table data. I have a front end form (frmFrontEnd) which is the only means for a user to access other forms, and before frmFrontEnd opens any other form it checks the current user name. In psudo-code it looks something like:

If username = "Admin" Then
open formX
Else
msgbox("You don't have permission to use this form.")
End If

Is there any way cause people opening the database from other machines to be required to log in? If not, is there another way to easily accomplish my goal of preventing unauthorized users from accessing other forms?

In advance, thank you!

nickvans
Oct 22 '07 #1
10 2233
ADezii
8,834 Recognized Expert Expert
Hi all,

After several months of development (I was totally new to SQL, VBA and MS Access when I started) I finally have my database all squared away and operating exactly how I want. (With a great deal of help from you fine people at theScripts--thank you!) So the time finally arrived to put my form on the network and allow other people to begin using it. Much to my dismay, none of the users/workgroups I set in the database seemed to come along for the ride.

I created a new Workgroup Administrator file (cleverly named System1.mdw) and put it in the network drive with the database and set the database to look for that file, but it seems that this only affects me on my machine. Other users are not even prompted for a username and password, which needless to say causes some problems.

My security is minimal and primarily geared towards preventing unauthorized users from using several forms which modify table data. I have a front end form (frmFrontEnd) which is the only means for a user to access other forms, and before frmFrontEnd opens any other form it checks the current user name. In psudo-code it looks something like:

If username = "Admin" Then
open formX
Else
msgbox("You don't have permission to use this form.")
End If

Is there any way cause people opening the database from other machines to be required to log in? If not, is there another way to easily accomplish my goal of preventing unauthorized users from accessing other forms?

In advance, thank you!

nickvans
The other Users are obviously not 'seeing' the Secured Workgroup Information File on the Network Drive. What they are seeing is the Default Workgroup File System.mdw residing in the C:\Program Files\Microsoft Office\Office\ Directory. You can run this little code snippit or run the MS Access Workgroup Administration Utility to find out which Workgroup File you are working under.
Expand|Select|Wrap|Line Numbers
  1. Dim retVal
  2. retVal = SysCmd(acSysCmdGetWorkgroupFile)
  3.  
  4. MsgBox "The current Workgroup File is: " & retVal
If the Users are using System.mdw locally, have each one in turn Join the Workgroup File on the Network Drive via the Workgroup Administrator. The last resort would be to force the Users to use System1.mdw via the Command Line /wrkgrp Parameter, but this is really not recommended, and we should never really have to go this route. Just as a side-note, do the Users have Permissions on the Network Drive and Folder where System1.mdw resides?
Oct 22 '07 #2
nickvans
62 New Member
The other Users are obviously not 'seeing' the Secured Workgroup Information File on the Network Drive. What they are seeing is the Default Workgroup File System.mdw residing in the C:\Program Files\Microsoft Office\Office\ Directory. You can run this little code snippit or run the MS Access Workgroup Administration Utility to find out which Workgroup File you are working under.
Expand|Select|Wrap|Line Numbers
  1. Dim retVal
  2. retVal = SysCmd(acSysCmdGetWorkgroupFile)
  3.  
  4. MsgBox "The current Workgroup File is: " & retVal
If the Users are using System.mdw locally, have each one in turn Join the Workgroup File on the Network Drive via the Workgroup Administrator. The last resort would be to force the Users to use System1.mdw via the Command Line /wrkgrp Parameter, but this is really not recommended, and we should never really have to go this route. Just as a side-note, do the Users have Permissions on the Network Drive and Folder where System1.mdw resides?
Thanks for the quick response ADezii. It looks like other users are in fact using System.mdw locally. I'm curious if having the users join the workgroup file will be a "global" change on their system. In playing around with the workgroup file yesterday, I discovered that when I open a different Access database I was still prompted for a username/password even though that database didn't have one initially. Is there a way to restrict Access to only using System1.mdw when opening my specific database?

To answer your side question, all users who will be using the database have access to the network drive/folder where System1.mdw resides, yes. The .mdw is currently in the same folder as the database.

Thanks again for your help!

nickvans
Oct 23 '07 #3
Curben
47 New Member
Thanks for the quick response ADezii. It looks like other users are in fact using System.mdw locally. I'm curious if having the users join the workgroup file will be a "global" change on their system. In playing around with the workgroup file yesterday, I discovered that when I open a different Access database I was still prompted for a username/password even though that database didn't have one initially. Is there a way to restrict Access to only using System1.mdw when opening my specific database?

To answer your side question, all users who will be using the database have access to the network drive/folder where System1.mdw resides, yes. The .mdw is currently in the same folder as the database.

Thanks again for your help!

nickvans
Make sure that the Admin account has a password, is moved to the "Users" group, and none of the object have "Admin" as the owner

Next you can make a shortcut to the database for users to use that will load your workgroup file ONLY when they access yoru Database.

Below is an example shortcut
Expand|Select|Wrap|Line Numbers
  1. "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" 
  2. "\\127.0.0.1\Project\Project.mdb" 
  3. /wrkgrp "\\127.0.0.1\Project\ProjectFiles\Security\Project.  mdw"
  4. /User "MyName" 
  5. /Pwd "MyPa55word"
keep in mind that the username and password operators are options, this bypasses the login screen and logs the user in with the info supplied in the shortcut. I use this version for my own desktop which is secured, and include the link w/o in the directory for the average user.
Oct 23 '07 #4
Curben
47 New Member
The other Users are obviously not 'seeing' the Secured Workgroup Information File on the Network Drive. What they are seeing is the Default Workgroup File System.mdw residing in the C:\Program Files\Microsoft Office\Office\ Directory. You can run this little code snippit or run the MS Access Workgroup Administration Utility to find out which Workgroup File you are working under.
Expand|Select|Wrap|Line Numbers
  1. Dim retVal
  2. retVal = SysCmd(acSysCmdGetWorkgroupFile)
  3.  
  4. MsgBox "The current Workgroup File is: " & retVal
If the Users are using System.mdw locally, have each one in turn Join the Workgroup File on the Network Drive via the Workgroup Administrator. The last resort would be to force the Users to use System1.mdw via the Command Line /wrkgrp Parameter, but this is really not recommended, and we should never really have to go this route. Just as a side-note, do the Users have Permissions on the Network Drive and Folder where System1.mdw resides?

ADezii,
Why do you recommend against using the workgroup peramater?
I have yet to experience an issue with it, and in my division there are many different DBs ou there using different workgroups. I am open to better or cleaner options.
Oct 23 '07 #5
ADezii
8,834 Recognized Expert Expert
ADezii,
Why do you recommend against using the workgroup peramater?
I have yet to experience an issue with it, and in my division there are many different DBs ou there using different workgroups. I am open to better or cleaner options.
I make it a policy never to incorporate User Names, Passwords, Workgroup Information Files, or anything similar to these as Command Line Arguments since there is virtually no security involved. It is a simple matter to have each Front End Application join the appropriate Workgroup, and as far as Users and Passwords as Command Line Arguments, I feel the reasons for not using them are obvious.
Oct 24 '07 #6
nickvans
62 New Member
Make sure that the Admin account has a password, is moved to the "Users" group, and none of the object have "Admin" as the owner

Next you can make a shortcut to the database for users to use that will load your workgroup file ONLY when they access yoru Database.

Below is an example shortcut
Expand|Select|Wrap|Line Numbers
  1. "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" 
  2. "\\127.0.0.1\Project\Project.mdb" 
  3. /wrkgrp "\\127.0.0.1\Project\ProjectFiles\Security\Project.  mdw"
  4. /User "MyName" 
  5. /Pwd "MyPa55word"
keep in mind that the username and password operators are options, this bypasses the login screen and logs the user in with the info supplied in the shortcut. I use this version for my own desktop which is secured, and include the link w/o in the directory for the average user.
Thanks for the reply Curben. As the primary function of wanting to password protect my database is to prevent certain users from getting into certain objects, I think your shortcut idea is great. I'm having problems getting the shortcut to work though. I'm getting an error "The path specified was invalid, or may be too long." when trying to run it. The path I currently have is

Expand|Select|Wrap|Line Numbers
  1.  "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" " Z:\VCC\Nicks Improvements/VCC_2.05.mdb" /wrkgrp "Z:\VCC\Nicks Improvements/System1.mdw" 
I've tried removing the /wrkgrp part to try to get it to simply open the file, but no luck. Should I only have quotation marks around the outside of the entire target path, or should they be around each file path as shown?

Thanks in advance!
Oct 24 '07 #7
Curben
47 New Member
Thanks for the reply Curben. As the primary function of wanting to password protect my database is to prevent certain users from getting into certain objects, I think your shortcut idea is great. I'm having problems getting the shortcut to work though. I'm getting an error "The path specified was invalid, or may be too long." when trying to run it. The path I currently have is

Expand|Select|Wrap|Line Numbers
  1.  "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" " Z:\VCC\Nicks Improvements/VCC_2.05.mdb" /wrkgrp "Z:\VCC\Nicks Improvements/System1.mdw" 
I've tried removing the /wrkgrp part to try to get it to simply open the file, but no luck. Should I only have quotation marks around the outside of the entire target path, or should they be around each file path as shown?

Thanks in advance!
Well first thing i notice is the extra space between the " and the path for the database itself. That may have been a typo into the forums here so I'll ignore it for now. Second thing, I have seen Access depending on version and image use different directories and as you have the same path as my example I will suggest checking that as well.

the /wrkgrp argument is required as a peramater, but we can test them like this.
Create a second shortcut, and use it to test each part of the path, make your shortcut target C:\Program Files\Microsoft Office\OFFICE11 \MSACCESS.EXE, test it, then change the target to Z:\VCC\Nicks Improvements/VCC_2.05.mdb and test again, and you can do the same thing with even the workgroup file (link direct dont use the peramater argument)
The links individually should each work, if not your problem is in the path and thats your solution.


Edit: Mind your slashes and backslashes, after submitting I noticed what likely is the issue. Your pathname includes backslashes as appropriate till you have the actual filenames:
Z:\VCC\Nicks Improvements/VCC_2.05.mdb
Oct 24 '07 #8
Curben
47 New Member
Well first thing i notice is the extra space between the " and the path for the database itself. That may have been a typo into the forums here so I'll ignore it for now. Second thing, I have seen Access depending on version and image use different directories and as you have the same path as my example I will suggest checking that as well.

the /wrkgrp argument is required as a peramater, but we can test them like this.
Create a second shortcut, and use it to test each part of the path, make your shortcut target C:\Program Files\Microsoft Office\OFFICE11 \MSACCESS.EXE, test it, then change the target to Z:\VCC\Nicks Improvements/VCC_2.05.mdb and test again, and you can do the same thing with even the workgroup file (link direct dont use the peramater argument)
The links individually should each work, if not your problem is in the path and thats your solution.


Edit: Mind your slashes and backslashes, after submitting I noticed what likely is the issue. Your pathname includes backslashes as appropriate till you have the actual filenames:
Z:\VCC\Nicks Improvements/VCC_2.05.mdb
The peramater should still be /wrkgrp with a slash
Oct 24 '07 #9
nickvans
62 New Member
The peramater should still be /wrkgrp with a slash
Yup, that slash was what did it. Thanks for helping me out!

nickvans
Oct 24 '07 #10

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

Similar topics

3
7218
by: Stanley J, Mroczek | last post by:
My disk was replaced and i reload all my software. I think that i named my computer best-si-01 instead of BEST-SI-01 and thats my error? Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:...
4
8781
by: Alex | last post by:
Hi All I'm writing scripts in VBS fore years. But now I've to write a tool in Visual Basic .Net which has to connet to a Windows domain. I know how to do this in VBS but I don't find a way in VB.Net. I've no idea how to logon to the domain via Net.Socket. It is not necessary to map a network drive. I can transfer data via UNC names. Can anybody give me a suggestion how to realize it?
3
314
by: Stanley J, Mroczek | last post by:
My disk was replaced and i reload all my software. I think that i named my computer best-si-01 instead of BEST-SI-01 and thats my error? Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details:...
4
16094
by: Prof. William Battersea | last post by:
Hello, Suppose I have a Vista machine called VISTA and an XP machine called XP in a workgroup named WORKGROUP. Physically they're connected to a router and I can see lists of public and shared files on each of them. How do I address these for IO? A search suggested that the form open(r"\\server\folder\folder"), but I tried many combinations guessing what it wants for that path in my case (r"\\WORKGROUP\VISTA", "\\VISTA\PUBLIC", etc),...
0
8725
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9074
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6560
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
5902
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4656
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3088
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
2392
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2027
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.