Download DOWNLOAD
Forums FORUMS
Blogs BLOGS
Forge FORGE
Help HELP
Marketplace MARKETPLACE
DotNetNuke Home
You are here >   Community > Forums
Register  |  Login

DotNetNuke Forums

DotNetNuke ForumDotNetNuke ForumUsing DotNetNuk...Using DotNetNuk...Administration ...Administration ...Resetting the ADMIN Password After RestoreResetting the ADMIN Password After Restore
Previous
 
Next
New Post
7/23/2008 9:12 AM
 

Thank You

New Post
6/8/2009 9: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 5: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
DotNetNuke ForumDotNetNuke ForumUsing 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.

Networks

Follow DNNCorp on Twitter Follow DNN Community on Twitter

LinkedIn

Sponsors

DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation

Hosted by MaximumASP