Knowledge Essentials - 3Essentials Hosting

Reset DNN host password

Article ID: 376

 Back to Search

How do I reset my DotNetNuke host "superuser" password?

If you lost the password of the host "superuser" account (and you cannot request the host password by email), the following solution will help:

 

For DNN 3 and DNN 4 installations:

Please note, that you need direct access to the database:

1. Go to Register a new user on your DotNetNuke Site. If "Register" is not displayed for the portal, go to table "Portals" in your database and enter value "2" into column "UserRegistration".

2. Create a new user account by registration (please remember the password you enter!)

3. Go to database, and find and enter the table "ASPNet_Membership"

4. Go to new user account (usually the last one) and copy the encrypted values of columns "Password" and "PasswordSalt" into the same columns of user account "host" (usually the first entry in this table)

5. Login as user "host" using the new password and delete the newly created other user.

6. Complete!

 

 

For DNN 5 or DNN 6 installations:

 

Note: This soultion is from the Twentytech.net blog: http://twentytech.net/Blog/tabid/68/EntryId/12/Recover-your-DotNetNuke-Host-Password.aspx

 

It is possible to recover your DNN host password if you have access to upload files to the site.  This can be done either via FTP or through the Plesk file manager.  You should place this into a new .aspx file that you upload to the DNN root directory, perhaps naming it something like recoverpassword.aspx:

<%@ Page Language="C#" %>
<script runat="server">
    void Page_Load(object sender, System.EventArgs e)
    {
        DotNetNuke.Entities.Users.UserInfo uInfo =
DotNetNuke.Entities.Users.UserController.GetUserById(0, 1);
        
        if (uInfo != null)
        {
            string password =
DotNetNuke.Entities.Users.UserController.GetPassword(ref uInfo, String.Empty);
            Response.Write("Password: " + password);
        }
        else
        {
            Response.Write("UserInfo object is null");
        }
    }
</script>
<html>
    <head>
        <title>Recover Password</title>
    </head>
 
    <body>
    </body>
</html>
 
 

Now visit that page on the site with your browser. It should show you your DNN host password.

 

IMPORTANT NOTE: YOU MUST REMOVE THIS FILE FROM YOUR SITE! If you don't, then other people will be able to easily access your host password.

This solution does not work on all DNN 5.x, 6.x and 7.x versions.  If you find it does not work on your DNN installation, use the steps outlined for DNN 3 and 4 installations, which should work on all versions (they are just slightly more complicated). 

 
Downloads Associated With This Article
No downloads are currently associated with this article.