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

How to reset user's password without having to use PasswordRecovery

Hi,

I want to be able to reset a user's password and I do not want to use
the PasswordRecovery control to reset and email it to the user. A
while back, I thought I'd read an article that mentioned about
resetting password using the Website Administration Tool. I could not
find such option in WSAT. Please help!

Thanks,
Jon

Aug 7 '07 #1
2 13621
The MembershipUser object has a ChangePassword method. It also has a
ResetPassword method, but the ResetPassword will generate one randomly. What
you can do though is obtain an instance of the user via their username

MembershipUser user = System.Web.Security.Membership.GetUser(username);
To change the password you need to know the old password, though if you call
resetpassword it will return the newly reset password string so you can do:

user.ChangePassword(user.ResetPassword(),"mynewpas sword);

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Homer" <Ho*******@gmail.comwrote in message
news:11**********************@g12g2000prg.googlegr oups.com...
Hi,

I want to be able to reset a user's password and I do not want to use
the PasswordRecovery control to reset and email it to the user. A
while back, I thought I'd read an article that mentioned about
resetting password using the Website Administration Tool. I could not
find such option in WSAT. Please help!

Thanks,
Jon

Aug 7 '07 #2
On Aug 7, 4:20 pm, "Mark Fitzpatrick" <markf...@fitzme.comwrote:
The MembershipUser object has a ChangePassword method. It also has a
ResetPassword method, but the ResetPassword will generate one randomly. What
you can do though is obtain an instance of the user via their username

MembershipUser user = System.Web.Security.Membership.GetUser(username);

To change the password you need to know the old password, though if you call
resetpassword it will return the newly reset password string so you can do:

user.ChangePassword(user.ResetPassword(),"mynewpas sword);

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Homer" <HomerS...@gmail.comwrote in message

news:11**********************@g12g2000prg.googlegr oups.com...
Hi,
I want to be able to reset a user's password and I do not want to use
the PasswordRecovery control to reset and email it to the user. A
while back, I thought I'd read an article that mentioned about
resetting password using the Website Administration Tool. I could not
find such option in WSAT. Please help!
Thanks,
Jon- Hide quoted text -

- Show quoted text -
Thank you Mark. I'll implement your suggestion now.

Aug 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: PiEmme | last post by:
On a Linux server a MySql db is installed. I was able to run mysql and mysqladmin without entering user and password, at first. Later both user and password have become required. Probably after...
3
by: eastcoastguyz | last post by:
On an Apache server, I want to be able to have a user name/password directory. I know this can be done with .htaccess, but I want to be able to do this for multiple users. The purpose of this, is...
1
by: Vikrant | last post by:
(1) Under AIX for user 'db2xy1' of DB2/UDB 7.2EE , can I change password (for user db2xy1) by smitty at any time ?, or I have to do db2stop before changing user db2xy1 password by smitty? (2) To...
4
by: Jefferson Cowart | last post by:
I'm writing a program for a college to use to allow students to register their computers for use on the network. Aside from a bunch of security related checks I would like the program to offer to...
1
by: kashifsulemani | last post by:
Dear All I have a problem ,as i created the new user its password became changed. I logon SQL Server as >> Server Name: localhost >> Server option : window athentication
2
by: Kleber | last post by:
Could anyone please help? I'm trying to MATCH the user's UserName and Password imput to the user's UserName & Password from the machine current logged on. User's Input: txtUserName="Joe"...
3
by: Ben | last post by:
Hi, when a password is sent to the user via email with the PasswordRecovery control, is it sent in "clear" even if the password is hashed or encrypted? Thanks Ben
4
by: hhlebanon | last post by:
I want to be able to access my trendnet ip camera from the internet without having a static IP assigned from my ISP Provider. I have a DSL Connection at home, connected to a router (trendnet) and...
1
by: Shandelzare | last post by:
I forgot my sql server password, and i need to get the sql sa password back, how can i retrieve my sql sa password? its SQL server 2005. Any advice is ok, i dont want to reinstall the SQL server,...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
3
by: efe2023 | last post by:
Hello Everybody, There is SQL Server 2008 R2 database with MS Access front-end (linked ODBC tables). I can see all linked tables in MS Access and can add new rows. However, when trying to update...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
1
by: jimatqsi | last post by:
So, I had this bright idea today that didn't quite work out. Or maybe it is working out but requires me to change a habit. I'm working on a form that will be a sub-form of another form. During...

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.