jump to navigation

Retrieving a member’s password December 16, 2008

Posted by mcamail2002 in Uncategorized.
trackback

The GetPassword method may be used to retrieve a member’s password and, at first glance, appears to require the password answer. By setting “requiresQuestionAndAnswer” to false in web.config, the GetPassword method can be called with an empty password answer and therefore can be effectively used to administratively retrieve a member’s password. Note that “enablePasswordRetrieval” must be set to true in web.config to enable the GetPassword method:

 If password is:

Clear text:   Simply call the GetPassword method with the username and without the need for a password answer to retrieve the password

Encrypted:   Simply call the GetPassword method with the username and without the need for a password answer to retrieve the password

             Hashed:       Not possible, however the password may be reset as described below.

string password = Membership.Providers”MembershipProviderForAdmin”].GetPassword(currentUser,string.Empty);

Comments»

No comments yet — be the first.