473,408 Members | 1,767 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,408 software developers and data experts.

OK button VB codes in login form

I have created the following tables:
tbl_users- username, userlogin, usersecurity & password fields
tbl_security- secid & securitylevel (1 for admin & 2 for users)
i have also created a login form with OK & Cancel buttons.
i have two text box in the login form:
1. login
2. Password
i want the following actions:
1. if either the login or password is typed wrongly a message is display.
2. if both are correct, then user can access specific forms, depending on the security level set for each. for Admin (1) access to say "switchboard" is granted & for user (2) access is grated to say "customer table".
3. after the login, the login form should be closed.
Oct 31 '17 #1

✓ answered by NeoPa

That wasn't a criticism of your question per se DUMS. I removed a post that answered your question in such a way as to leave you, and anyone using a system designed that way, exposed to severe criticism.

In the current climate security is a very important issue. Anyone storing passwords at whatever level has a responsibility to keep them very safe - as they may be a window into very much more than just your system.

It is a great deal safer for you, and anyone considering putting your own security process in place, to use a system already designed and available to you. One example is to get the UserName from the local security context (whether that be Domain or PC level) and allow/deny based on that. The Account used is easy to get (Function to Return UserName (NT Login) of Current User). Groups less so but can be done. My systems work this way. No passwords stored. I just get the account name and check for certain group memberships. For the account name to be available the user has already proven their bona fides by logging on in the first place.

If you create a basic system that stores passwords and someone breaks into that and steals the stored passwords then you can be found to be criminally negligent and hit with severe punitive damages. Most don't appreciate just how dangerous an area this is - and it's increasingly so as time goes on. This isn't going to go away.

So, beware what you ask for. You have been warned.

PS. Yes. Your question was asked well. You were just unlucky to stumble over an area of such importance and sensitivity that I was obliged to intervene (The last thing I wanted to do was delete a post from my good friend ADezii. He's been contributing on this site even longer than I have).

4 2570
NeoPa
32,556 Expert Mod 16PB
I'm a little surprised to see a solution suggested that has passwords stored and compared in the raw. That's a dangerous and irresponsible approach when you consider how many people use the same passwords for multiple systems. Yours could be the unlocked door that allows someone, without even any hacking skills, to take over someone's identity and ruin their life. I suggest that serious consideration be given before using any such system.

Sorry for expressing this so strongly, but this is a very serious issue and we at Bytes.com must be seen to take it seriously and handle it responsibly.

Someone asking such a question is far better advised to use existing security rather than trying to build their own. MS Domains, and even single systems, have security built in. It makes much better sense to use this than rolling one's own as it were. There are numerous examples of such questions already that are easily found with a little searching.

Unfortunately, there are also examples of routines written for the ones that ask the question instead of considered advice that pertains to their situation. Avoid these unless you want to end up on the wrong side of a big law suit, or even if the idea of causing such damage to someone else is not something you're comfortable with.

There are also articles available on Bytes.com that explain how to encrypt data in such a way that the password cannot be cracked, as well as explaining how best to make the comparison such that the unencrypted text is never stored anywhere.
Nov 1 '17 #2
just cannot really comprehend what you trying to come up with.
i have taken my time to simply explain what support i need- regarding codes for a login form.
simply expecting someone to help me along with the necessary code to accomplish the bullets above.
so what sparked up the issue of security breach.
anyway thanks.
cheers!!!
Nov 1 '17 #3
NeoPa
32,556 Expert Mod 16PB
That wasn't a criticism of your question per se DUMS. I removed a post that answered your question in such a way as to leave you, and anyone using a system designed that way, exposed to severe criticism.

In the current climate security is a very important issue. Anyone storing passwords at whatever level has a responsibility to keep them very safe - as they may be a window into very much more than just your system.

It is a great deal safer for you, and anyone considering putting your own security process in place, to use a system already designed and available to you. One example is to get the UserName from the local security context (whether that be Domain or PC level) and allow/deny based on that. The Account used is easy to get (Function to Return UserName (NT Login) of Current User). Groups less so but can be done. My systems work this way. No passwords stored. I just get the account name and check for certain group memberships. For the account name to be available the user has already proven their bona fides by logging on in the first place.

If you create a basic system that stores passwords and someone breaks into that and steals the stored passwords then you can be found to be criminally negligent and hit with severe punitive damages. Most don't appreciate just how dangerous an area this is - and it's increasingly so as time goes on. This isn't going to go away.

So, beware what you ask for. You have been warned.

PS. Yes. Your question was asked well. You were just unlucky to stumble over an area of such importance and sensitivity that I was obliged to intervene (The last thing I wanted to do was delete a post from my good friend ADezii. He's been contributing on this site even longer than I have).
Nov 1 '17 #4
I have to second Neo's reccomendation of pulling the logged in user. With all the passwords we are required to remember in today's realm - it's easier to use the measures in place already. Another positive aspect is you don't have to worry about lockouts and it takes a more "savy" explorer to figure out how to change permissions.
Nov 2 '17 #5

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

Similar topics

5
by: | last post by:
Hi, I have a simple MDIChild login form that loads before the parent, and if the user hit's the cancel button on the login form, the whole app should unload. How can I do this? Thanks
7
by: Grant Merwitz | last post by:
Hi I am trying to get the enter key to submit my login form The login form is currently in a control on the page and uses an asp:imagebutton as it's login button. If a user presses enter...
7
by: Nerrad | last post by:
Hi, i am currently working on a project which requires me to create a form to allow the user to change their password. I know there is a user-level security login which is easier and safer but...
0
by: shangardezi | last post by:
hello im a noob in visual basic. I was wondering can someone help me to make a login form which sends all the information to my email. Any codes or anything? Just need something that will send the...
5
by: SagarDoke | last post by:
suppose there are 2 files "1.html" and "login.html". from "1.html" i am opening second page "login.html". "1.html" contain one button with value "signin". when i clicked on that button login form...
8
by: gamazone | last post by:
hi to all is it possible to auto fill and auto login the facebook login form? i am developing a web application in which , user will in put his,say for facebook, login information in his home...
1
by: ibsaqi | last post by:
Hello friends i am basically a new in programming language...i got readymade new login script and which i want to use for another form for my website.i.e Form that i want to use in my website...
5
by: lgoddgreat | last post by:
Hi I have this project currently on going and I'm stack in the login form, I've done most of the part but still i cant seem to find a solution to this part. the login form has 2 Textbox and 1...
4
by: ittechguy | last post by:
I'm trying to create a very simple login form. I need it to have a text box where a user can enter a password and login to the db. At which point, they'd have full access to read data, edit data, add...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
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,...
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...
0
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,...
0
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...
0
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...

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.