PDA

View Full Version : NEED HELP PLEASE!! Deleted User Issue


kmfdm_kid2000
02-03-2003, 04:58 AM
Recently, someone thought it was cute to delete 2 of my more prominant users somehow using MY account in the Admin CP. I have an SQL back up from Friday, which is only 2 days old, it's pretty recent. How can I restore these 2 users using PHPMyAdmin from that back up?? I ran the querries to restore them in the User Table, but what else do I have to run? All of their posts are still set to guest, and I can't access their accounts in my Admin CP...

Any help I would REALLY appreciate. Code hacks are one thing, but when someone hacks your Admin account like that, it makes you feel kinda violated you know... :ermm:

zajako
02-03-2003, 06:50 AM
Find the userfield rows that have their userid's then copy those. it should work after that.

kmfdm_kid2000
02-03-2003, 07:05 AM
Yeah, I Figured that out...What I'm going to do is add all of the new SQL from the Post Table, merge it with the old data as a new file, because the old SQL has the User ID#'s for those posts, and it'll include all of the NEW posts...This is gonna be a HUGE querry, I'll break it up into bits...

Link14716
02-03-2003, 10:36 AM
UPDATE post SET userid='newuserid' WHERE username='username';

Just fill in the userid of one of them, the username of the same member, run it, and repeat. Then, just update the counters. :)

filburt1
02-03-2003, 01:54 PM
Then protect your forums by changing your password, .htaccessing your admin and mod CPs, securing phpMyAdmin, FTP, SSH, CPanel, and Telnet, and banning the hell out of the user who hacked your board while reporting him to his ISP.

kmfdm_kid2000
02-04-2003, 01:58 AM
Can you tell me how I can secure my Admin and Mod CP's with .htaccess??

Also, I have one user almost fully restored, but I'm entering the UserID into the Post table for post made by him and that have user ID# 0...

Is there a querry that i can run to say "In Post Table, make all posts with Username slamedsilver that contain User ID# 0 into User ID#16"?? It's very tedious using PHPMyAdmin to MANUALLY edit the user ID# of 500 more posts :(

mr e
02-04-2003, 03:28 AM
cant u just do

UPDATE post SET userid='16' WHERE username='slamedsilver'

kmfdm_kid2000
02-04-2003, 03:46 AM
Originally posted by mr e
cant u just do

UPDATE post SET userid='16' WHERE username='slamedsilver'

OMG, That did the trick, YOU'RE AWESOME DUDE!!!

007
02-10-2003, 12:16 PM
is there any way to see usernames in phpMyAdmin?? i have to do something like this too, but i need to make sure I don't screw something up... ive heard horror stories of entire databases just gone...

UPDATE post SET userid='16' WHERE username='slamedsilver'

say i have userid=0 for multiple names? as far as i know these names aren't registered (it was a post only import) and somehow i heard it was possible to create these users from this somehow? anyone got any ideas? also how to you restore from a backed up database? i accidedtally clicked index on useractivationid and so far haven't noticed any problems but i dunno yet. or maybe how would i un-index this? any help would be appreciated. :)

Martin64
02-10-2003, 12:32 PM
Although this doesn't secure your Admin/Mod CP, I can really recommend this hack by FireFly, called "Get an e-mail if someone is trying to access your Admin CP (With IP address)"

https://vborg.vbsupport.ru/showthread.php?s=&threadid=32707

If you wish to .htaccess your directories with a password, I recommend taking a look at this site:

http://www.webmaster-toolkit.com/htaccess-generator.shtml

filburt1
02-10-2003, 04:56 PM
I also have a .htaccess generator on my site (http://www.webdesignforums.net/); go to it with the dropdown menu just above the forum listings.

grief
07-13-2004, 05:20 PM
cant u just do

UPDATE post SET userid='16' WHERE username='slamedsilver'


This was very handy, thank you