• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Access to admin account

Scheduled Pinned Locked Moved Unsolved Technical Support
3 Posts 3 Posters 113 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Meketeke
    wrote on last edited by
    #1

    Access to admin account

    I do not have access to the admin user account (who is the only administrator of my forum). When I installed nodebb and everything it generated that user and I don't have his credentials.

    Is it possible to give me admin on my new user somehow?

    I have tried doing a database query adding the admin group to my user as the admin user has it, but it doesn't work.

    db.objects.updateOne(
      { username: 'Meketeke' },
      { $set: { groupTitle: '["administrators"]' } }
    )
    
    
    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #2

    Get your user id from app.user.uid and then run.

    db.objects.insert({
      _key: "group:administrators:members", 
      value: "<replace_by_uid>", 
      score: <replace_by_current_unix_timestamp_in_milliseconds>
    });
    

    Then restart nodebb.

    1 Reply Last reply
    0
  • oplik0O Offline
    oplik0O Offline
    oplik0 Plugin & Theme Dev Community Rep
    wrote on last edited by oplik0
    #3

    There are also two cli commands for this!

    1. ./nodebb user make admin <uid> for what you and Baris described - giving an existing user administrative privileges
    2. ./nodebb user reset <uid> to reset the password (<uid> will be 1 for default admin; the command will auto-generate a password and return it, you can also set your own with -p/--password option)
    1 Reply Last reply
    2

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development