Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

password use

Status
Not open for further replies.

OmNi23

Technical User
Mar 1, 2004
7
GB
i have a password entry system ( no username)
can i input two passwords into this box?
i have hidden buttons which the user sees after password is entered but id like to hide one of the buttons from normal users and have a super user that has all access
 
I do not understand your difficulty.

Instead of telling what you code is wanting to do, please tell us in words what you are trying to achieve (ie a mini application specification).

"Life is full of learning, and then there is wisdom"
 
okay i am using a text box to input a password no probs there

what i want to know is it possible for the entry password system to recognise two seperate users with two seperate passwords.using the same text box
sorry if this is still not clear
 
It sounds like you need to know who is logged on to Windows. Am I correct?

For example: For each user, the DB would hold the user's password and you would validate it depending upon their Windows logon ID.

"Life is full of learning, and then there is wisdom"
 
nope sorry im obviously not making myself clear
ok i have built a programme which will input customer details ie room measurements and perform an estimation for them of carpet cost,underlay fitting etc.
Part of this program is a stock database so instead of putting nother password refernce to block everyone from accessing this part of the program. I would like to just have the initail password log in to recognise the user and allow access to areas i choose.
 
Well..... So do you have a login windows that just accepts a P/W and depending upon the P/W you allow access to certain areas of the application via (say) making a command button enabled or visible - is this correct?

Example: Ordinary uers would have a password but a superuser would have a different P/W, or does each person have their own password but the DB contains information as to the access level?

"Life is full of learning, and then there is wisdom"
 
yes that is correct i only need two passwords.
one super user who would make all command buttons visible thus enabling access to all areas.

and one for normal users which would give access to everywhere but data base and button links to database i would keep hidden.

as i dont know how to do this my only other option is to duplicate some of the forms and just give them different pathways
 
Psuedocode:

Code:
Select Case LCase(txtPasswordInput.Text)
     Case "user-level password"
         'disable / make disappear all super-user controls
     Case "superuser-level password"
         'show all super-user controls
     Case Else
         'handle other passwords
End Select

That doesn't take into account any security or whatever, but on a very basic level it will do what you need. The Select Case structure will also let you expand the code to include other passwords. Actual implementation is up to you.

HTH
 
What Andy said about taking security into account is MOST important:

1) How does the Super User change his/her P/W once it becomes known.

2) Do you want to keep a super user access log showing when the super user (or even an ordinary user) logged in and out.

3) If you decide that changing p/w's is important then the p/w should be kept in a DB table. If that is the case then put a (different) password on the DB itself (that means you will have to change your DB connect string in the VB code). Having a password on the DB will stop some smartie from user MS Access to get into the DB, but don't forget to change that P/W every so often, I am assuming that you are using a Jet DB.

Cheers.

"Life is full of learning, and then there is wisdom"
 
well thanks to both of you
at this stage its just a beginners prog so i could get away with the simple version.

but yes you are right there is security issues which leave the db open and vulnerable.

and setting a password up on the db is good but the db has to be accessed on the estimate form so that would allow access.
the updating of the db is done through my last form and with the simple version i can hide that from normal users
i take it i can passsword protect the db change the string which allows both users to access the db but that still leaves the security issue of the vb superusers password being compromised.

so i guess the reality of total protection would still be a problem unless its impossible to give the superuser change password priveledges, which as you can guess at this stage would be over my head.

but once again thanks to the both of you.
 
while im here is there a simple way to get 1 dhtml or html page to load from a form?
 
BTW: the DB P/W is known only to you (the developer). That P/W is used in the VB code when you connect to the DB. Having such a P/W stops people from using MS Access to open the DB. If you have P/W protection then if someone was to try to open the DB in Access, the first thing that Access does is to request the P/W - no P/W: then Access will not open it.

The DB P/W is not the same as the superuser p/w.

HTML page: tell me more - do you have a page that you wish to launch (say) into IE/Mozilla etc or .........

"Life is full of learning, and then there is wisdom"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top