PC Review


Reply
Thread Tools Rate Thread

RE: Changing password with code

 
 
Eric Butts [MSFT]
Guest
Posts: n/a
 
      15th Sep 2004
Hi,

If you followed the article exactly:
ACC2000: How to Change User Passwords Programmatically Using DAO
http://support.microsoft.com/default...B;EN-US;200665


The key parts of calling the function ChangeUserPassword are the following:
====================================================================

TO ALLOW USER TO CHANGE THEIR OWN PASSWORD:
(looks like you are using this one)

For the button function
Private Sub CmdChange_Click()

The key lines are
Call ChangeUserPassword(CurrentUser(), "", Me!txtNewPassword)

Call ChangeUserPassword(CurrentUser(), Me!txtOldPassword,
Me!txtNewPassword)


FOR THE ADMINSTRATOR TO CHANGE A USER'S PASSWORD:

For the button function
Private Sub cmdChangeAdmin_Click()

The key lines are
Call ChangeResetPassword("Change",Me!txtUserName, _
me!txtAdminUsername, me!txtAdminPassword, Me!txtNewPassword)


So in your case it appears that you should be calling the function as
follows

Call ChangeUserPassword(CurrentUser(), Old Password if any, New Password)

NOTE: if the use does not have an Old Password then the argument passed is
""

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support
(E-Mail Removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights

--------------------
| Thread-Topic: Changing password with code
| thread-index: AcSabrpiD8Xyy6QWT4Cg59/Rm8Uhtw==
| X-WBNR-Posting-Host: 64.112.130.107
| From: =?Utf-8?B?TmVpbCBDYXNo?= <(E-Mail Removed)>
| Subject: Changing password with code
| Date: Tue, 14 Sep 2004 08:23:03 -0700
| Lines: 15
| Message-ID: <4DB481AB-E538-445C-A915-(E-Mail Removed)>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.security
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.security:13463
| X-Tomcat-NG: microsoft.public.access.security
|
| I give up, I need help. I looked at the security faq, and I have the
change
| password with DOA method code. And it doesn't work. I double checked to
| make sure that I had the right reference selected, and I do have
Microsoft
| DAO 3.6 Object Library selected. And it still doesn't work. I think
it's a
| REALLY simple fix, because I'm not sure what goes into the function. I
have
| a call to the function, and I'm not sure about proper format or what goes
| into it. Here is what I have tried so far:
| ChangePassword
| ChangePassword()
| ChangePassword([Enter User Name],[Enter New Password])
| ChangePassword("","")
| ChangePassword(strUser, strPwd)
| ChangePassword(,)
|
| I'm obviously missing something here, please help me...
|

 
Reply With Quote
 
 
 
 
Eric Butts [MSFT]
Guest
Posts: n/a
 
      20th Sep 2004
Hi,

What goes in for ???? is the new password

Regards,

Eric Butts
Microsoft Access Support
(E-Mail Removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights

--------------------
| Thread-Topic: Changing password with code
| thread-index: AcSbImZEb703alNfRd+gf20OyyUhQA==
| X-WBNR-Posting-Host: 64.112.130.107
| From: =?Utf-8?B?TmVpbCBDYXNo?= <(E-Mail Removed)>
| References: <4DB481AB-E538-445C-A915-(E-Mail Removed)>
<(E-Mail Removed)>
| Subject: RE: Changing password with code
| Date: Wed, 15 Sep 2004 05:49:12 -0700
| Lines: 22
| Message-ID: <A73157C8-E262-420E-91E1-(E-Mail Removed)>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.security
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.security:13489
| X-Tomcat-NG: microsoft.public.access.security
|
| I was using the code from the security faq available from Microsoft. It
| looks something like this:
| Function faqChangePassword (ByVal strUser As String, _
| ByVal strPwd As String) As Integer
|
| Dim ws As Workspace
| Dim usr As User
|
| Set ws = DBEngine.Workspaces(0)
| Set usr = ws.Users(strUser)
| usr.NewPassword "", strPwd
| End Function
|
| And I'm calling to it on a switchboard button. Thanks for the
CurrentUser()
| command, that seems to be working. So when I call to it, I have:
| faqChangePassword(CurrentUser(), ???)
| I'm not sure what goes in where the question marks are. I think this is
| where the user needs to input something, what's the format for indicating
| that this parameter is a value the user needs to input? I'd prefer to
use
| this code because it's a little bit simpler. But thanks for the web page
| anyway.
|
|

 
Reply With Quote
 
=?Utf-8?B?TmVpbCBDYXNo?=
Guest
Posts: n/a
 
      21st Sep 2004
What do you type in the function to indicate that it takes the new password
where the ???'s are?

"Eric Butts [MSFT]" wrote:

> Hi,
>
> What goes in for ???? is the new password
>
> Regards,
>
> Eric Butts
> Microsoft Access Support
> (E-Mail Removed)
> "Microsoft Security Announcement: Have you installed the patch for
> Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
> you to review the information at the following link regarding Microsoft
> Security Bulletin MS03-026
> <http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
> to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
> the patch. Running the SCAN program from the Windows Update site will help
> to insure you are current with all security patches, not just MS03-026."
>
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> --------------------


 
Reply With Quote
 
Eric Butts [MSFT]
Guest
Posts: n/a
 
      22nd Sep 2004
Hi,

The function is already created for you.

The user just needs to type in the new password.

Here's an example of how I'm calling the function from a command button
click:

- I have a textbox on my Form called "MyNewPassword" where the user enters
their new password
- The code behind the command button is

Private Sub Command28_Click()
Dim i As Integer
i = faqChangePassword(CurrentUser(),
Me.MyNewPassword)
End Sub

- So the user types in the new password in the textbox control named
"MyNewPassword" then clicks my command button "Command28"

Regards,

Eric Butts
Microsoft Access Support
(E-Mail Removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights



--------------------
| Thread-Topic: Changing password with code
| thread-index: AcSf0qtTLDQmIAB7RImzSEoOoh7B4Q==
| X-WBNR-Posting-Host: 64.112.130.107
| From: =?Utf-8?B?TmVpbCBDYXNo?= <(E-Mail Removed)>
| References: <4DB481AB-E538-445C-A915-(E-Mail Removed)>
<(E-Mail Removed)>
<A73157C8-E262-420E-91E1-(E-Mail Removed)>
<(E-Mail Removed)>
| Subject: RE: Changing password with code
| Date: Tue, 21 Sep 2004 05:01:03 -0700
| Lines: 27
| Message-ID: <F4230161-C25B-48BF-80AF-(E-Mail Removed)>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.security
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.security:13609
| X-Tomcat-NG: microsoft.public.access.security
|
| What do you type in the function to indicate that it takes the new
password
| where the ???'s are?
|
| "Eric Butts [MSFT]" wrote:
|
| > Hi,
| >
| > What goes in for ???? is the new password
| >
| > Regards,
| >
| > Eric Butts
| > Microsoft Access Support
| > (E-Mail Removed)
| > "Microsoft Security Announcement: Have you installed the patch for
| > Microsoft Security Bulletin MS03-026? If not Microsoft strongly
advises
| > you to review the information at the following link regarding Microsoft
| > Security Bulletin MS03-026
| > <http://www.microsoft.com/security/security_bulletins/ms03-026.asp>
and/or
| > to visit Windows Update at <http://windowsupdate.microsoft.com/> to
install
| > the patch. Running the SCAN program from the Windows Update site will
help
| > to insure you are current with all security patches, not just MS03-026."
| >
| > This posting is provided "AS IS" with no warranties, and confers no
rights
| >
| > --------------------
|
|

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing a users password without knowing the old password nor the answer to the password question AAaron123 Microsoft ASP .NET 2 16th Jan 2009 03:08 PM
Code for changing password SF Microsoft Access Forms 1 5th Jul 2006 12:36 AM
Code for changing user password? SF Microsoft Access Security 0 3rd Mar 2006 11:18 AM
User changing password with code Damien McBain Microsoft Access 4 4th Sep 2004 01:16 PM
Changing Password to an account that has to change password at first logon using System.DirectoryServices Fabrizio Microsoft C# .NET 10 1st Jul 2004 04:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:30 PM.