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

Thank You

 
New Post
6/9/2009 12:43 AM
 

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 8: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!

 
New Post
4/20/2012 3:32 PM
 

Awesome!  This saved me!

 
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
Start  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

Sponsors

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.