HomeHomeUsing DotNetNuk...Using DotNetNuk...Administration ...Administration ...Resetting the ADMIN Password After RestoreResetting the ADMIN Password After Restore
Previous
 
Next
New Post
7/23/2008 10:12 AM
 

Thank You

 
New Post
6/8/2009 10:43 PM
 

We have to pass ApplicationName instead of ApplicationID.I modified the above code and corrected the Query....

Declare @UserName NVarChar(255)
Declare @NewPassword NVarChar(255)
Declare @PasswordSalt NVarChar(128)
Declare @Application NVarChar(255)

-- Enter the user name and new password between ''
-- do not leave any spaces unless intended to do so.
-- Edit only between single quote characters
Set @UserName = 'admin' -- This is a default DNN admin user; the default host user is 'host'
Set @NewPassword = 'newpassword' -- Your new password

SET @APPLICATION = (SELECT [APPLICATIONNAME] FROM ASPNET_USERS U,ASPNET_APPLICATIONS A WHERE  U.APPLICATIONID = A.APPLICATIONID AND  USERNAME=@USERNAME)
Set @PasswordSalt = (SELECT PasswordSalt FROM aspnet_Membership WHERE UserID IN (SELECT UserID FROM aspnet_Users WHERE UserName=@UserName))

Exec dbo.aspnet_Membership_ResetPassword @Application, @UserName, @NewPassword, 10, 10, @PasswordSalt, -5

 

 
New Post
10/21/2009 6:06 PM
 

We created a new copy of 5.1.4 on our staging server (we attempted upgrade but could never make it work) and moved all our custom code from 4.9.1 to that site. Then thanks to BulkUser Manager2 we got all our users imported to new server and then moved all the pages. Everything worked fine. We moved all pages to production site, and then restored data from staging server on production server. Looked great but no logins worked....Yes we ultimately found that the two machineID were different and so PW were scrambled. Using the script above we recovered admin user and then reset all PW, could have been worse. 

This little piece of Beautiful code save us hours and hours of work. THANK YOU!

 
Previous
 
Next
HomeHomeUsing DotNetNuk...Using DotNetNuk...Administration ...Administration ...Resetting the ADMIN Password After RestoreResetting the ADMIN Password After Restore


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Try An Online Demo
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates Snowcovered.com where users purchase third party apps for the platform.