SOLVED 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:

    https://community.nodebb.org/topic/1008/lost-admin-password/13

    But it got weird:

    http://pastebin.com/xLY0pRtD

    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?

  • Admin NodeBB

    If you have no administrators you can run ./nodebb setup again to create a new admin user.


  • Ok. I got my admin rights back with a little help from this format here:

    https://community.nodebb.org/topic/1008/lost-admin-password/15

    If anyone has similar problem in the future:

    1. Log into redis-cli
    2. delete the hosed group:administrators:member
    3. Create a new user if you can't login with your old one
    4. Find out what your ID by checking the newest ID's with hgetall user:IDhere and reading the info
    5. 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.

Suggested Topics

| |