473,405 Members | 2,185 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,405 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 13651
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.