Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Oops. Changed the default Admin user number
Avatar
Dave
Member
Offline
Jul 18, 2013 - 5:15 am

OK, several months back there were a rash of WordPress site compromises. I run a pretty tight setup, but the one thing I had never changed is the default Admin id (was 1 - is now 491). Well, I made that change using Better Wordpress Security and at the same time I updated my actual name to be in compliance with Google Authorship standards.

I never put two and two together, but I've had admin difficulties for the past few months and it finally clicked that the problems are associated with the id change. The problems included approvals and such not sticking.

Tonight I also noticed that all my previous posts are now assigned to "guest" even though the username is still a forum admin.

What I didn't realize is that SimplePress actually created a new user when the id was changed that didn't have admin privileges, even though the admin bar appeared when I was logged in - this is the reason my approvals and such didn't "stick".

So, I've added the "new" user to the admins group and everything seems to be working except my previous posts are still associated with user id 1 and listed as guest.

Anyway other than sql to correct those so they are attributed to me? If not, anyone know the sql statement I would need to run against sfpost to make the change?

I also have users still appearing as moderators in the forum stats who I removed after my id change. They do not, however, show as moderators in the admin panel.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jul 18, 2013 - 6:10 am

I am trying to work out whether just making the change to the user_id in the sfposts table will be more or less enough but I would go for it. We can probably sort any leftovers if there are any...!

So the SQL for that would be:

UPDATE wp_sfposts SET user_id=491 WHERE user_id=1;

Although you may need to change the table prefix (hope so!) and double check that the ID 491 is correct.

After you run that SQL I would suggest you go to the forum admin > Toolbox > Housekeeping and run the user post count cleanup option.

If your forum stats are showing old data then this could mean that your WordPress CRON scheduler has stopped functioning. This is not uncommon. To re-start the scheduler - try deactivating Simple:Press and then immediately reactivating it. Note - deactivate. Do NOT use uninstall!

As always before you run that SQL I would make a full site database backup just in case you need to restore back. Always best to be safe!

 

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dave
Member
Offline
Jul 18, 2013 - 6:32 am

Thanks YS. DB updated. Plugin de-activated/re-activated, but users still appear in forum stats as moderators.
Also, do you mean Clean New Posts List? That is the only mention of posts in tools>housekeeping.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jul 18, 2013 - 7:25 am

Ah - sorry. Probably the post count tool is a part of the upcoming 5.3 development. because of WordPress 3.6 now being over 2 months late some of these things seem to have been sitting in my test forums for a very ling time! WHEN you update to 5.3 then run that tool! It will correct your post count.

OK - so when you go to the forum admin > Manage user Groups and look at any user groups where you have the moderator flag turned on - are these users listed?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dave
Member
Offline
Jul 18, 2013 - 7:33 am

Yellow Swordfish said
Ah - sorry. Probably the post count tool is a part of the upcoming 5.3 development. because of WordPress 3.6 now being over 2 months late some of these things seem to have been sitting in my test forums for a very ling time! WHEN you update to 5.3 then run that tool! It will correct your post count.

No problem, we all have those moments. :)

OK - so when you go to the forum admin > Manage user Groups and look at any user groups where you have the moderator flag turned on - are these users listed?

Nope.

Avatar
Dave
Member
Offline
Jul 18, 2013 - 8:42 am

Also, when looking at the forum stats it still shows the "old" username as an admin and clicking that to view the profile brings up the "guest" profile.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jul 18, 2013 - 1:42 pm

the stats are cached... they should clear out after an hour or so...

you can go to forum - toolbox - cron inspector and manually for the 'sph_stats_cron' to run to update...

let us know if that resolves it...

Avatar
Dave
Member
Offline
Jul 19, 2013 - 1:19 am

The stats didn't update after 12 hours, nor did they update after running the cron.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jul 19, 2013 - 6:58 am

So let's just recap...
Are ALL of your stats incorrect and are NONE being updated?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Dave
Member
Offline
Jul 19, 2013 - 7:23 am

Some are and some are not.

Guests, currently online, newest members - yes
Moderators and Admins - no

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625