Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Resetting the ADMIN Password After RestoreResetting the ADMIN Password After Restore
Previous
 
Next
New Post
6/5/2006 1:45 PM
 

DNN 4.0.3 with SQL Server 2005 Express

After doing a successful SQL Server Management Studio Express backup of ..\App_Data\Database.mdf, I wanted to be sure the Restore would work.  So I used SQL SMS Express to restore, and that seemed to run OK too. While the portal comes up OK, the Admin and Host passwords are gone.  (this is a test installation with only two users so far).  I suppose the passwords are NOT backed up, so they cannot be restored.

I attempt to use default passwords - admin and host - but they will not work.  When I use <Password Reminder>, I receive a email reminder, but the password field is blank.  I attempt to logon with blank password, but that doesn't work, either.

How might I reset the Admin and Host passwords, manually if I have to?

---

I Googled this SQL script, which was referred to as a script to change DNN passwords at the system level.  The query did not run successfully.  I've never worked with DotNetNuke 3.x or before, but I'm thinking maybe this query is designed for a pre-4.0.x installation?  I someone with more knowledge than I about DotNetNuke architecture could update this for DNN 4.0.x, that would be most useful:


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 [ApplicationID] FROM aspnet_Users WHERE 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



If a problem can be solved, there's no use worrying about it.
If it can't be solved, worrying will do no good.
 
New Post
6/6/2006 7:41 PM
 

Windows Server 2003; DotNetNuke 4.0.3; SQL Server 2005 Express

 

While working on a brand new installation of DotNetNuke, I decided to do a backup of the DNN database, then attempt to restore the database to be sure I could backup/restore after I deploy the portal, when later there is more data in the database (users, portals, data, etc.).  When I did restore, I found that my restore did not contain the ADMIN and HOST passwords.  The accounts were there, but the passwords would not work.  Did the default passwords come back?  No, they did not work either, and neither did blank passwords work.  Maybe the passwords did not backup and/or restore?  I’m not sure why I couldn’t use the passwords, but I decided I needed to somehow reset them so I could continue working with this DNN installation.  I decided to attempt to edit the passwords directly from SQL Server Management Studio Express (SQL Server MSE).  These are the steps I used to edit the DNN 4.0.3 DATABASE.MDF file directly using SQL Server MSE.

 

Before working directly with the DotNetNuke database, you want to be sure no one is accessing the DNN database.  Inside IIS, STOP the website(s) where the DotNetNuke application is running.  Maybe you might need to stop IIS altogether if you have many DNN portals working with several websites.

 

The next step, reset/refresh permissions on the DotNetNuke folder, was very important for my installation.  I found it necessary to reset/refresh the permissions on the DotNetNuke application folder BEFORE and AFTER making any changes directly to the DNN DATABASE.MDF file using SQL Server MSE.  If I did not reset/refresh permissions before and after SQL Server MSE, I would get errors inside SQL Server MSE or errors attempting to browse to the DotNetNuke portal.

 

Reset/Refresh Permissions - Using Windows Explorer:

Highlight the DotNetNuke folder and (right-click) to select: Sharing & Security > Security [tab] > Advanced [button] > [enable] Replace permission entries on all child objects with entries shown here that apply to child objects > OK [button] > “Do you wish to continue?” Yes [button]

 

Using SQL Server Management Studio Express (SQL Server MSE):

To change passwords directly inside the DNN DATABASE.MDF file using  SQL Server MSE: if you have not already attached to the database: (right-click) the Databases folder to select Attach… > browse to DotNetNuke\App_Data\ DATABASE.MDF file, and click OK to make the connection.  When attached: select the DotNetNuke\App_Data\DATABASE.MDF database from the Databases folder, and open the Tables folder.  Highlight the (dbo.)aspnet_Membership table, right-click and select Open Table.  You should see data within the table.

 

The top record is typically the HOST user, and the second record is typically the ADMIN record.  You can scroll to the right to confirm the email addresses for HOST/ADMIN.  To reset the HOST and/or ADMIN passwords, on the record row you wish to modify, first change the PasswordFormat value from 2 to 0.  I found that changing PaswordFormat from 2 to 0 deactivates encryption on passwords. Then enter a new password in the Password field.  I then clicked the “Save All” icon on the toolbar, but I suspect the record changes happen immediately.  Exit SQL Server Management Studio Express.

 

Using Windows Explorer:

Reset/Refresh the permissions on the DotNetNuke application folder (see above).

 

Restart IIS, or Start the website(s) that you stopped earlier – the one(s) that lead to your DotNetNuke application.

 

Using Your Browser:

Access your DotNetNuke portal and you should now be able to login to the ADMIN and/or HOST account using the new password you set above.

 

Register a temporary, new user on this portal and note the password for this user.  Exit your DotNetNuke portal.

 

* I create a new user (only the third user in my DNN installation, after HOST and ADMIN) so that DNN can take a new, encrypted version of a new password that I KNOW.  You need this encrypted password so that we can re-enable encryption on the passwords for HOST and/or ADMIN.

 

Note: My portal was set to Registration: None, which is why I needed to get back in as ADMIN and enable registration before I could then create a temporary, new user above, a user whose password I'll use below.

 

Stop IIS, or Stop the website(s) that leads to your DotNetNuke application.

 

Using Windows Explorer:

Reset/Refresh the permissions on the DotNetNuke application folder/files and subfolders (see above).

 

Using SQL Server Management Studio Express (SQL Server MSE):

Databases > Tables > highlight the (dbo.)aspnet_Membership table, then right-click and select Open Table.  You should see data within the table. To reset the HOST and/or ADMIN passwords, on the record row you wish to modify, first change the PasswordFormat value from 0 to 2.  I found that changing PaswordFormat from 0 to 2 reactivates encryption on passwords.  Locate the temporary, new user record you created above.  Copy the contents of that temp user Password field into the Password field for the HOST and/or ADMIN user records. Exit SQL Server MSE.

 

Using Windows Explorer:

Reset/Refresh the permissions on the DotNetNuke application folder/files and subfolders (see above).

 

Restart IIS, or Start the website(s) that you stopped earlier – the one(s) that lead to your DotNetNuke application.


Using Your Browser:

Access your DotNetNuke portal and you should now be able to login to the ADMIN and/or HOST account using the password of the new user you created above.  Change your HOST and/or ADMIN passwords to something unique/secure.


If a problem can be solved, there's no use worrying about it.
If it can't be solved, worrying will do no good.
 
New Post
6/16/2006 7:49 PM
 

This module might help you, it sends a correct password reminder.

Point to note though, the HOST password is never sent, just *******

http://www.snowcovered.com/Snowcovered2/Default.aspx?tabid=242&PackageID=4904

 

 
New Post
7/8/2006 12:50 PM
 

I've been working through a backup and restore exercise. I backup the database from my web hosting account and then I restore it to a local computer and run it on localhost. I get the usual problems but once I've worked through those I needed to use your suggestion to be able to log on to the host account. I notice that none of the previous username/password combinations will work anymore.

Is this a known fact about DotNetNuke? Or is there a special way to do a restore and preserve the username/password's that are in the DB. The objective of this exercise is to be able to test the ability to move a DotNetNuke installation from one host to another.


ver 4.3.1 (to 8 July 2006) ver 4.3.2 (to 20 July 2006) ver 4.3.3 (to 5 Aug 2006) ver 4.3.4 (to 20 Sep 2006) ver 4.3.5 (to 25 Dec 2006) ver 4.4.0 (to date)
 
New Post
11/8/2006 10:23 PM
 

Hey,

When DNN is checking the password that you enter it uses 2 pieces of information from the web.config file. validationKey and decryptionKey. If the web.config at your house does not have the same values for these as the web.config on your web host you will have this issue.

P.S When you instal DNN the validationKey and decryptionKey values are randomely generated.

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


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out