akshat
  •  akshat
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2014-06-17T19:11:01Z
Dear Team,

Hope you all are doing good, I was able to clear all barriers & was able to run the forum successfully.

During my exploration I was trying to create a new forum inside the existing forum during which I by mistake had mentioned the same mail id as the first one with different user names & the database got corrupted due to which I am not able to login to admin panel nor been able to recreate the admin panel.

Also would like to know how to access the new forum which is being created in the existing forum as there was no option of link generation or admin access.

Can you please help me on how to reset the admin panel as I cannot drop the database even as I have a existing database, please help me with this on how to recreate the admin panel from fresh.

Awaiting for reply

Regards

Akshat
Sponsor
Coleen
  •  Coleen
  • 89.2% (Honored)
  • YAF Commander
2014-06-17T23:52:01Z
Do you have access to your SQL database to edit/update records? If so, to change the admin password so that you can log in as admin if you've lost your admin password or it's been corrupted somehow, I was able to go to the "register" page in Yaf, register as a new user (of course this new user won't be approved yet if your users need approval, but for our purposes it doesn't matter.) Registeras a new user - I used an obvious testuser name and just kept the user name and password the same for simplicity's sake i.e., User Name=TestUser100 password=TestUser100 and a fake email account (TestUser100@test.com)

Then I opened the SQL Server for editing. I went to the Yaf database table yaf_prov_membership. I found the new user that i just created and copied BOTH the encrypted password and pasted that into my admin paswoord, then the password_salt encrypted for the new user and pasted that inot the admin password_salt and then went to log in using the new user password for the administrator. It worked! As soon as you get in as the administrator, change your password from the User Profile page in Yaf, THEN go back and delete the record for the new user (If you want to clean up your database) or - leave it there to be able to copy & past the password (as long as you write it down) at any future time when you forget or lose your admin password again. 🙂 I hope that helps -it worked for me so let me know if it works for you!
akshat
  •  akshat
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2014-06-18T04:48:09Z
Thanks a lot Coolen for the reply, I had tried doing the same but on clicking on the login button the new usre or the admin user is not able to even login as it shows a run time error.

Can you please help me if I have to delete all tables manually & recreate the whole forum again then how can I do so as I believe the untire database has got corupted towards which I would need to create the whole database from scratch.

The problem is I cannot drop the entire database as I have existing projects tables as well, thus would have to delete all the tables manually.

Please guide on how to do so ?
tha_watcha
2014-06-18T08:54:09Z
Are you able to login to the old board?

Quote:

Also would like to know how to access the new forum which is being created in the existing forum as there was no option of link generation or admin access.



Which board is loaded can be defined in the default.aspx

<YAF:Forum runat="server" ID="forum" BoardID="1">
UserPostedImage
akshat
  •  akshat
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2014-06-18T12:35:25Z
Thanks for the reply, yes I have the old forum on display only, but the problem is that the admin panel is not accesiable on both the forums.

Can you please suggest me on how to delete the tables manually and recreate the database as the problem is with the database only, I cannot drop the database as their are other tables as well.

Kindly advice
akshat
  •  akshat
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2014-06-18T12:48:25Z
I have the default file with the board 1 only, the problem is that the admin mail id is not being found in the database, the registered new user id is being catched by the forum whena lost password is called.

Can there be a procedure to create admin account manually from the sql server database access ?

Or else I would have to wipe all the tables and then re create the same, another problem is that opn wipping tables I get a n error of foreign key being assigned thus few of the tables cannot be deleted.

Kindly assist me if I can create a admin account manually or how to delete table with foreign key assisned so as to re create the whole database.

Please advice
Coleen
  •  Coleen
  • 89.2% (Honored)
  • YAF Commander
2014-06-18T13:27:01Z
akshat, I am by no means an expert here, but since I have recently had to completely delete and re-install my entire forum, including the database, I hope I can help a little, and if not maybe with the help of the wonderful guys here (Watcha and Zero, who are my heros, thanks guys!) we can help you with your issues.

First I would say do NOT delete your entire database with out FIRST backing it up! Even if it is corrupted (and yes, mine was due to a server error from my previous hosting service!) but if you delete the database you will lose ALL existing forum data - don't do it with out a back-up DB!

Now let's see if we can address your problems one at a time - if I'm understnding them correctly.

First, you say your admin email is not found in the database? Which table are you looking at? Per my experience (and pleasae correct me Watcha - I may be missing one) there are three main tables for when a new user registers - this includes when you have a bad admin login. The tables are yaf_prov_membership, yaf_users and yaf_checkemail.

The first table is the yaf_prov_membership table. (and in fact, I'm working on mine as we speak to fix corrupt data!) but in that table there should be your admin user in the colum "User Name" and there should also be an email address for the admin user in that table. This is the table where you want to copy the NEW USER "Password" and "PasswordSalt" from to paste into the Admin user's password and password salt to overwrite the corrupted admin password. If there is no admin email here, you'll need to create a new Admin user. Let's tackle this part first - is there an admin email in that table?
akshat
  •  akshat
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2014-06-18T13:51:41Z
Thanks a lot for the reply, no I dont have any admin email registered in the database, where in when a new user registers on the forum the email is being shared at the email id of admin.

And even I dont mind deleting the whole database as there is not much of data, I can re create the untire database again.

I had cross checked in all the 3 main tables mentioned but there is no admin id registered where in during the installation the second time the admin id is not being created

Thus I believe the best option would be to start from scratch
Coleen
  •  Coleen
  • 89.2% (Honored)
  • YAF Commander
2014-06-18T14:01:39Z
Quote:

I had cross checked in all the 3 main tables mentioned but there is no admin id registered where in during the installation the second time the admin id is not being created

Thus I believe the best option would be to start from scratch


If that's the case and you truly don't have much data then, yes, I'd start completely over. In fact, in all of my working on getting switched over to my new hosting service, I completely deleted and re-installed the entire yaf forums not just once, but three times on my local host to make sure I got it right before I moved it to the new service (and then still had errors (sigh) but now it works!)

So, yeah, my suggestion is to go ahead and do that. If you haven't alredy done so, make sure you download the newest version of the Yaf forums from here: http://yetanotherforum.net/download  and follow the installation instructions from here: https://github.com/YAFNET/YAFNET/wiki/Installation . If you are integrating it within another website, make sure to read these instructions: https://github.com/YAFNE...ting-ASP.NET-Application  as it is VERY important to get the correct files in the correct root directory.

Let us know how it goes and we'll all try to help you through it. Good luck!
akshat
  •  akshat
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2014-06-18T14:41:36Z
Thanks for the quick response, yes I had following the link mentioned instructions only & was able to setup the entire forum. The only mistake which was a big mistake I did was I corrupted the database by creating two forums with the same admin mail id which corrupted both the forums.

Thus I am deleting all the forum tables, views and would reinstall the complete forum once again from scratch, hope that would solve the problem.

Really appreciate your time and thanks a lot for the support.
akshat
  •  akshat
  • 54.2% (Neutral)
  • YAF Forumling Topic Starter
2014-06-18T16:19:15Z
Dear Team,

Thank you all for your valuable time and response, after lot of struggle and googling I was able to delete the untire database manually & recreate the whole forum database with the help of admi panel.

A suggestion to all who forget about the admin mail id password, just login to the sql server and go to prov_membership table & check the password mentioned there.

Kindly note do not delete any of the user details or you would have to delete all tables againa nd rebuild the same as that would corupt the database, this would be the biggest mistake to courpt the database.

Thanks once again all for the support and help really appreciate it.
Coleen
  •  Coleen
  • 89.2% (Honored)
  • YAF Commander
2014-06-19T18:54:50Z
I'm glad you were able to get the database deleted and re-installed. 🙂

Quote:

A suggestion to all who forget about the admin mail id password, just login to the sql server and go to prov_membership table & check the password mentioned there.


This is where if at some time you forget your admin password and just can't get back in as an admin, it comes in handy to create a new "Test" user and name the user, password and all related data for the new user the same thing - that way, you can always go back into the SQL and copy the new "Test" user's password and password salt and paste it into the Admin's password and password salt and you're back in businss (just remember the "Test" user password, and make sure to change your admin password using the yaf forums interface as soon as you are logged back in as the Admin!)

Good luck with your forums 🙂

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved