Need admin rights back - Database hosed from smf import
-
So it seems my Redis database got hosed from smf import somehow. First I just my admin rights and was logged in as some other users. Then when I tried to remedy the situation by following instructions here:
lost admin password
@baris said: hget group:gid administrators hi,when I run hget group:gid administrators it's return nil why?
NodeBB Community (community.nodebb.org)
But it got weird:
Pastebin.com - Not Found (#404)
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin (pastebin.com)
So ok - I got that fixed now by going to Redis and deleting group:administrators:member key from Redis.
So .... how do I get my admin rights back now?
-
Ok. I got my admin rights back with a little help from this format here:
lost admin password
@julian Thank you! I use another way which you offer, and reset the admin's password successfully. To reset the password even if no email is installed: Go ...
NodeBB Community (community.nodebb.org)
If anyone has similar problem in the future:
- Log into redis-cli
- delete the hosed group:administrators:member
- Create a new user if you can't login with your old one
- Find out what your ID by checking the newest ID's with hgetall user:IDhere and reading the info
- zadd group:administrators:members yourIDhere "yourIDhere"
-
@baris said:
If you have no administrators you can run
./nodebb setup
again to create a new admin user.Yes that was one of the first things I tried but my database got hosed pretty bad with failed smf import. Now when I login I'm someone else and everything is messed up.
But I was able to get admin rights back. I will now probably try to delete all the imported users and see if that helps a bit ...
Tried the import again ... and was stupid enough to turn on the maintenance mode. It logged me out and there doesn't seem to be any way to log in again - users, admins all alike are now locked out.
Nasty buggy piece of software ... grr.
-
@Pilvinen said:
@baris said:
If you have no administrators you can run
./nodebb setup
again to create a new admin user.Yes that was one of the first things I tried but my database got hosed pretty bad with failed smf import. Now when I login I'm someone else and everything is messed up.
But I was able to get admin rights back. I will now probably try to delete all the imported users and see if that helps a bit ...
Tried the import again ... and was stupid enough to turn on the maintenance mode. It logged me out and there doesn't seem to be any way to log in again - users, admins all alike are now locked out.
Nasty buggy piece of software ... grr.
Read the docs rather than plowing along at full speed. I imported hundreds of users from SMF and had no issue at all.
Come to think of it, I built the SMF installer.
-
That's right - make bad code and then insult people. Of course I read the documentation.
I think the problem is that once upon a time I deleted the user who had the UID of 1. And this has now brought up all kinds of nasty bugs and situations.
I would be cool to get back that user ID but I haven't yet figured out a way to do it. I tried renaming the database keys and the values within but I missed some obviously and it just made the account unusable.
I would normally just delete the database and start over but after already spending ~96 hours on configuring the templates, css, js and html of the forums this does not appeal to me at all.
I wonder who had the bright idea of storing all of this in the database in the first place.
If I had an easy way of importing back only the relevant data I guess I would do that.
-
You're more than welcome to submit a pull request so the plugin takes into account you deleting UID1. Until then, being ungrateful about someone giving up more than 96 hours of their time making a plugin others can benefit from seems a little shallow.
Your issues may have spanned from the plugin being old/out of date. This is an issue when making plugins during a forums infancy, as development goes on, changes need to be made. But again, pull requests can be made to combat this.