Reset ntopng admin password

I had a comment on my recent Ntopng article from a user who needed to reset the admin password on ntopng.

Ntopng uses redis as a backend data store. So first check that the redis server is actually running:

netstat -luntap | grep redis

You should get output similar to:

tcp        0      0 127.0.0.1:6379              0.0.0.0:*                   LISTEN      1565/redis-server
tcp        0      0 127.0.0.1:6379              127.0.0.1:49579             ESTABLISHED 1565/redis-server

Test a connection to redis:

redis-cli ping

You should get back:

PONG
Then to set the admin user password to topsecret run the following:

redis-cli SET user.admin.password ea847988ba59727dbf4e34ee75726dc3

Ntopng uses md5 password hashes. To generate a different hash use the following:
echo -n "opensesame" | md5sum

10 Responses to “Reset ntopng admin password”

  1. turgut

    The example needs to be:
    echo -n “opensesame” | md5sum
    then it generates the md5 that is needed.

    Reply
  2. Fadhili

    Hi there thanks for the lesson.
    From this post (http://blog.redbranch.net/2013/11/07/ntopng-on-centos-6/#comment-16502),
    I have managed to install ntopng on Centos 6.
    But something happened. In the log in page, when i enter username and password admin/admin it does not work. I stuck over here.
    I followed this post but still i could not be able to log in NB. Redis server is on and running.
    The output from the command echo “mypassword” | md5sum gives something like ea847988ba59727dbf4e34ee75726dc3 – copied only ea847988ba59727dbf4e34ee75726dc3 and use it on the command redis-cli SET user.admin.password ea847988ba59727dbf4e34ee75726dc3 is anthing wrong so far?

    Kindly assist

    Reply
    • Daffy

      I’m having the same problem as Fadhili, anyone have any suggestions?

      Interesting, when I MD5 mypassword, I get d84c7934a7a786d26da3d34d5f7c6c86…must have to do with something in the system…

      Reply
  3. Jim

    I have the same problem as Fahill and Daffy. I don’t know why this is happening with ntopng. I’ve done 5 fresh installs to get logins to work, but after several days, logins stop working.

    Reply
  4. Sam Coffland

    I tried the above commands without any luck. I determined the user account above was not correct by running strings /var/lib/redis/dump.rdb | grep admin which showed a key for ntopng.user.admin.password. I was able to reset the password then by doing

    redis-cli SET ntopng.user.admin.password ea847988ba59727dbf4e34ee75726dc3

    It should also be noted that ntopng does not allow special characters in the passwords and silently fails. This is how I got locked out of the UI.

    Reply

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>