CurrentUser's password

CoddFish

Registered User.
Local time
Today, 05:50
Joined
May 26, 2003
Messages
36
I know you can get the current user by using the CurrentUser() method. Is there a way to get the current user's password in VBA?
 
CoddFish said:
I know you can get the current user by using the CurrentUser() method. Is there a way to get the current user's password in VBA?

Network administrators in conventionally configured networks don't know and never need to know a user's password.
 
Last edited by a moderator:
Who's the one with the evil imagination?

:eek: WOW! I didn't mean to put up any red flags or piss anybody off! I hadn't even considered (nor do I fully understand) what you have suggested my intentions might be. My intention is to utilize a user's login password to query a table (tblSpecialist)for cross-reference. This way, I will know which menu to display, depending upon the user. I could use the CurrentUser() method for this, but there is always the chance that two users could end up having the same name -- this is why I wanted to base my query upon the user's password (each user's password is also stored in tblSpecialist). Below is the current code that occurs on the unload event of my splash screen (I am currently using CurrentUser() as the parameter for the query):

Private Sub Form_Unload(Cancel As Integer)

Dim db As DAO.Database
Dim QD As QueryDef
Dim test As Integer
Dim rstSpecialist As DAO.Recordset
Dim name As String
Dim admin As Boolean

Set db = CurrentDb()
test = 0

Set rstSpecialist = db.OpenRecordset("tblSpecialist", dbOpenSnapshot)
rstSpecialist.MoveFirst

Do Until rstSpecialist.EOF
name = rstSpecialist("FirstName") & " " & rstSpecialist("LastName")
If name = CurrentUser() Then
test = 1
admin = rstSpecialist("AdminStatus")
If admin = True Then
DoCmd.OpenForm "Administrative Tools", acViewDefault
ElseIf admin = False Then
DoCmd.OpenForm "Specialist Tools", acViewDefault
End If
Exit Do
Else
rstSpecialist.MoveNext
End If
Loop
If test = 0 Then
MsgBox "Specialist not found."
Else
End If

I have to admit, I'm a bit offended by the accusation. However, I can understand and appreciate your sensitivity to possible threats to security.
 
Coddfish,

Not an evil imagination. Real-life experience. You provided no explanation while posing a classic hacker question: How do I programmatically get someone's password? I certainly wasn't trying to offend you -- a nameless, faceless person on the Internet (no offense there either) -- not when I have a real family and noisy neighbors and conniving colleagues to kick around and blame for anything and everything.

Regarding your follow up, I have some thoughts -- and a few questions -- about what you're doing but the only thing I feel comfortable recommending is that you simply not allow two people to use the same user name at the same time.

Regards,
Tim
PS. How did you make out with those nested subforms?
 
pono1 said:
Network administrators in conventionally configured networks don't know and never need to know a user's password.

--------------------------------------------------------------------------------
Last edited by Mile-O-Phile : Today at 12:30 AM. Reason: Unjustified Comments QUOTE]

Mile,

You're censoring posts now? And this post? Now I'm offended.

Regards,
Tim
 
pono1 said:
You're censoring posts now? And this post? Now I'm offended.

:cool: Coddfish was offended. Don't forget there's a moderators forum (and PMs) if you have any doubts. ;)
 
Last edited:
Mile-O-Phile said:
:cool: Coddfish was offended. Don't forget there's a moderators forum (and PMs) if you have any doubts. ;)

Certainly you can do as you like. An editor's ax swinging moodily here and there can dampen posters' enthusiasm, however.

Regards,
Tim
 
I know - I don't edit at will (unless post titles have spelling errors or give no indication as to their problem). I've got to react, though, when people PM me with grievances.
 
Going back to the original question at hand

Why dont you use the current WINDOWS user? That is allways unique and should allready be PW protected. Mile posted a nice DB somewhere to do just that (and some other nifty things) Its somewhere in the VBA forum *Searching for you* -- Darn that guy posts a lot ;) --

:( i cannot seem to find it, maybe he can tell you where it is at. Or you can try and create it yourself. Its out there i am sure....

Regards
 
Mile-O-Phile said:
I know - I don't edit at will (unless post titles have spelling errors or give no indication as to their problem). I've got to react, though, when people PM me with grievances.

Ah, humanity... (No slight, Mile -- not a big deal.)
 
Mile-O-Phile said:
It will be our falling down...

Mmmm -- one favor: in the future, unless it's something blatantly obscene (a slippery enough slope) or you personally dislike the poster, please think twice before censoring posts, even if you're tempted to do so because a person whines about their feelings being hurt as they bully or schmooze you into taking action.

Often the best reaction is no reaction.

Regards,
Tim
 
Do unto others...

pono1 said:
Mmmm -- one favor: in the future, unless it's something blatantly obscene (a slippery enough slope) or you personally dislike the poster, please think twice before censoring posts, even if you're tempted to do so because a person whines about their feelings being hurt as they bully or schmooze you into taking action.

Often the best reaction is no reaction.

Regards,
Tim


Tim,
You might consider taking your own advice.
-CoddFish
 
Last edited:
Mile-O-Phile said:
I split that thread and moved it to the Sample Databases forum - here it is. :cool:

Thanks namliam for the suggesstion. Thanks Mile-O-Phile for the link. Thanks pono1 for the knowledge.

-CoddFish
 

Users who are viewing this thread

Back
Top Bottom