News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Deleted a fellow admin's account on accident, can this be fixed?

Started by Eagle31, June 04, 2018, 10:07:07 PM

Previous topic - Next topic

Eagle31

Greetings,  I deleted by mistake another admins account on the forum but not his postings. So me seeing this a couple days later I created another account manually using the same user name and email address and of course it did not change anything as to his prior account postings had him labeled as "Guest" this is SMF version 1.1.21. I had built this forum in 2011 and then left a few months later and have just come back to help them with spam problems and other issues a few days ago. This is a very low traffic board for a club that only has anywhere from a few postings a day to a few a week. Can this be fixed...???  On a side note I DID do a backup before his account was deleted but NOT on the server but on the forum software itself and saved in gzip format with both the Table Structure and Table Data. Can this be fixed...???...If not I am in a lot of trouble...PLEASE HELP.

(EDIT: Lex tampered with the title. )

Sir Osis of Liver

There's a maintenance feature in 2.0 that allows you to attribute guest posts made with an email address or username to a new account, don't see it in 1.1.  If you have a good recent database backup from before you deleted the account, you can restore it and forum content will revert to date of backup.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

Do you have a way to contact your fellow admin outside the forum?

The easiest way to fix this would be to reattribute the guest posts to a new account, and let them know what happened. PMs, personal settings and other details would be lost forever, but would not require messing around with the backup.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Eagle31

Quote from: Aleksi "Lex" Kilpinen on June 04, 2018, 10:58:19 PM
Do you have a way to contact your fellow admin outside the forum?

The easiest way to fix this would be to reattribute the guest posts to a new account, and let them know what happened. PMs, personal settings and other details would be lost forever, but would not require messing around with the backup.
I just came back to this club and that would create a LOT of drama and that is what I would like to avoid.

Aleksi "Lex" Kilpinen

It can be done, there is not a built in tool for it though.
Basically the same method but manually through the database.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Aleksi "Lex" Kilpinen

Quote from: Eagle31 on June 04, 2018, 11:01:25 PM
I just came back to this club and that would create a LOT of drama and that is what I would like to avoid.
Then do you have access to the server and database? You would need to be absolutely sure your database backup is complete and functional, but using that is the only option to fully reverse this.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Eagle31

I can GET access but as to the backup file like I said this was done through the forum software not the server.

Aleksi "Lex" Kilpinen

Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Eagle31

Quote from: Aleksi "Lex" Kilpinen on June 04, 2018, 11:12:11 PM
How big is the forum, and how large is the backup?
Like I said above it is a really small board. The backup that I did with the SMF software is less than 2 meg. Super small file.

Aleksi "Lex" Kilpinen

Ok, if you can I would suggest creating a new database and importing the backup in it. Then using repair_settings change the forum to use that new database, keeping the old one as a backup in case the dump wasn't perfect.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Eagle31

Quote from: Aleksi "Lex" Kilpinen on June 04, 2018, 11:29:19 PM
Ok, if you can I would suggest creating a new database and importing the backup in it. Then using repair_settings change the forum to use that new database, keeping the old one as a backup in case the dump wasn't perfect.
I am sorry but I do not know how to do that ?

Aleksi "Lex" Kilpinen

That would require access to the server, and details would depend on your hosting.

Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Eagle31

Quote from: Aleksi "Lex" Kilpinen on June 04, 2018, 11:43:41 PM
That would require access to the server, and details would depend on your hosting.
Server access I can get. What is the name of the File folder in the SMF installation I would need access to.

Aleksi "Lex" Kilpinen

Not a file in the folder structure usually.
Most commonly the hosting control panel (cPanel or Plesk for example) will have a section for database related things.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Eagle31

Quote from: Aleksi "Lex" Kilpinen on June 04, 2018, 11:58:00 PM
Not a file in the folder structure usually.
Most commonly the hosting control panel (cPanel or Plesk for example) will have a section for database related things.
Ok, Lex, let me look into some things with the server and our Club President and I will back to you on this thread either tomorrow night or the next day. Is that ok ?

Aleksi "Lex" Kilpinen

Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Eagle31

Quote from: Aleksi "Lex" Kilpinen on June 05, 2018, 12:19:21 AM
Sure, we'll be here :)
I have not been into that server in almost seven years. I will have the needed information to do so by tomorrow night. After I get into it and look around a bit I will post up.

Illori

if you did a backup from the admin panel, it is possible it is not a good database backup to use as that function is known to not do a complete database backup.

Aleksi "Lex" Kilpinen

For future reference, and to further clarify for Sir Osis of Liver what I meant.

Reattribute posts:



UPDATE {db_prefix}_messages SET ID_MEMBER='THEIR__NEW_ID' WHERE postername='Old_Nickname';



For example, if the guest posts now show "LexArma" and you wish to reattribute them to a new member with the name "LexArma" and ID number 105, the query would be



UPDATE smf_messages SET ID_MEMBER='105' WHERE posterName='LexArma';



This would effectivily return all the posts written by anyone using the name LexArma, to be linked with the account ID 105.

This would NOT fix the post count though, and for that you should probably try this mod
Member post recount and run maintanence. :)
( The mod is old but may work still, I'm not sure )

Personal Messages (maybe partial):

UPDATE {db_prefix}_pm_recipients SET ID_MEMBER = 'NEW ID NUMBER' WHERE ID_MEMBER = 'OLD ID NUMBER'

UPDATE {db_prefix}_personal_messages SET ID_MEMBER_FROM = 'NEW ID' WHERE fromName = 'OLD USER NAME'


Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: