Jul 8

Written by: Dylan Barber
7/8/2009 10:34 AM  RssIcon

I had someone forget their admin password to a portal I installed 5 years ago, apparently the sticky note fell off the site administrators monitor and got thrown away (#grin*). They called me to get it back but of course I had them change it when I left. Thinking this is a problem for others I have the standard database hack/solution for this that works for the DNN user system.

*You need access to the database to do this:

  1. Create a new user account by registration (this time, please remember the password you enter!)
    • If "register" is not displayed for the portal, go to table "Portals"  in your database and enter value "2" into column "UserRegistration".
  2. Go to database, enter table "ASPNet_Membership"
  3. 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) 
  4. Login as user "host" using the new password and delete the newly created user.
  5. If you changed the “Portals” table, revert UserRegistration mode in Site Settings.
  6. Remember your password!!!!!!!

3 comment(s) so far...


Gravatar

Re: Lost Admin/Host Password in DNN

Good post. Alternate method (faster and dirtiest); just set "IsSuperUser=1" in Users table on any known (or new) user, reset the host and whatever other user (i.e. admin) password and then revert the change (IsSuperUser=0)

By Horacio Judeikin on   7/8/2009 12:36 PM
Gravatar

Re: Lost Admin/Host Password in DNN

Another possibility is to set the passwordformat=0 (Cleartext), then enter whatever password you want for the userid
Once signed in change the passwordformat back (=2 typically) and update password again so it is encrypted.

But I do like to SuperUser trick...
Paul.

By Paul on   7/8/2009 1:05 PM
Gravatar

Re: Lost Admin/Host Password in DNN

Great alternatives guys!For managing our some 10,000 users we built a little desktop app to connect to our dnn database and given a username we can retieve their password - was quite a neat little trick Thank to my partner Lyle who wrote it over at zacuke.com/

By Dylan Barber on   7/8/2009 1:08 PM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel