neuronet
neuronet

Reputation: 1159

How to reset password for root in arangodb?

I'm root and I forgot it What can I do now?

I tried to reinstall arangodb, remove all databases but after new installation old password still exist

Upvotes: 12

Views: 7713

Answers (4)

Sumit Kumar
Sumit Kumar

Reputation: 760

Step 1:- Stop running instance of arangodb

     sudo systemctl stop arangodb3

Step 2:- Start arangodb with disabled authentication

     sudo /usr/sbin/arangod --server.authentication false

Step 3:- Start arango shell in new terminal

     arangosh

Step 4 :- Change password of root in arango shell

     require("@arangodb/users").replace("root", "new-password");

Step 5 :- Close arango shell

     exit

Step 6 :- Stop arangodb unautheticated service in the previous terminal

     CTRL + c

Step 7 :- Restart arangodb service

     sudo systemctl start arangodb3

Upvotes: 1

Thomas Fauskanger
Thomas Fauskanger

Reputation: 2656

I'm running ArangoDB3 as a service on Ubuntu, and I wasn't able to figure out how to pass the --server.authentication false or --server.endpoint tcp://127.0.0.1:8529 parameters to the arangod process.

I made it work by changing the same values in /etc/arangodb3/arangod.conf.

Upvotes: 2

neuronet
neuronet

Reputation: 1159

service arangodb3 stop
/usr/sbin/arangod --server.authentication false

and then

require("@arangodb/users").replace("root", "my-changed-password");
exit
service arangodb3 restart // **VERY IMPORTANT STEP!!!**
//if you don't restart the server everyone can have access to your database

Upvotes: 13

CodeManX
CodeManX

Reputation: 11885

Start the server arangod with the option --server.authentication false. This will disable authentication, so that you can access the databases without password. If you are asked for credentials in arangosh or the web interface, use root as username and a blank password. You can then change the password of user root (in the web interface: USERS > root > Change Password).

It is advisable to bind the server to --server.endpoint tcp://127.0.0.1:8529 and not 0.0.0.0 with authentication turned off, so that no one from outside can access the unprotected database, but only you locally on the server (you can also bind it to a network address, but make sure that the port is not open to the public in that case).

Upvotes: 7

Related Questions