Most likely you are reading this because you are frantically trying to figure out how to login into your DotNetNuke portal because you have found yourself locked out. You may have even received a password reminder with a blank password. Having fun yet???
When we were first testing DotNetNuke in the DNN 3 beta days, we had a problem with not being able to login into the host account. I fixed the issue by overwritting the host
Password and
PasswordSalt fields in
aspnet_Membership table. Recently, the same issue arose and I had to do this again. So, I decided to jot down a few notes that I hpe will help you in solving your issue. Read on....
Before I explain, lets check to make sure it is not one of the other issues related to not being able to login.
- Clear your cache and cookies and retry to login
- Did you recently upgrade your DotNetNuke site or change the web.config? If so, the passwords are encrypted and stored in the membership provider tables using the machine validation and decryption key strings. They are located in the web.config below the server connection string. You can now thank <insert favorite God> you backed up the DNN installation before upgrading, because you can go back to the old web.config and use the machine keys to upgrade your new web.config file. Look for something like this:
<add key="MachineValidationKey" value="extremelylongrandomlookingstringofcharacterswouldgoinhere" />
<add key="MachineDecryptionKey" value="anothersetofextremelylongrandomlookingstringofcharacterswouldgoinhere" />
- Did you accidentally change the Login page in Admin > Site Settings > Advanced Settings? You can do the following: **NOTE** Make sure you change your PortalID appropriately.
From SQL Server Management Studio or Enterprise Manager, run the following statement:
SELECT TabID, TabName FROM Tabs WHERE (TabName LIKE '%Login%') AND (PortalID = '0')
Find the Tab?
If you get a result, and are sure it is the Login page, run the following SQL Statement to update your settings:
**NOTE** Make sure you have the correct TabID and PortalID!
Update Portals Set LoginTabID = '123' WHERE (PortalID = '0')
You should now be directed to the login page of your portal....
Didn't Find the Tab?
If you did not get a result to the first query and deleted the Login page, you are screwed...just kidding. John Mitchell's Blog provides the solution.
None of those work for you? Join the club!
The solution:
Assuming you have more than one account for your portal (some lowly user account will do), run the following SQL:
SELECT aspnet_Users.UserName, aspnet_Membership.Password, aspnet_Membership.PasswordSalt
FROM aspnet_Membership INNER JOIN aspnet_Users ON aspnet_Membership.UserId = aspnet_Users.UserId
WHERE (aspnet_Users.UserName = 'host') OR (aspnet_Users.UserName = 'someusername')
You should now be able to see the Password and PasswordSalt row you need to use to replace your host account Password and PasswordSalt.
UPDATE aspnet_Membership
SET Password = 'someusernameencryptedpasswordstring', PasswordSalt = 'someusernameencryptedpasswordsaltstring'
WHERE UserID = 'youraspnetuseridforhost'
Now, go to the login page and request your password reminder. You should now have the information you need to login into your portal.
Hope that helps!
UPDATE 3/12/2006:
It may be neccessary to change the ApplicationID to match the portal in use.