orientjs icon indicating copy to clipboard operation
orientjs copied to clipboard

Can't change admin password server side

Open ArnoBuschmann opened this issue 8 years ago • 8 comments

Being new with OrientDB, I might get a concept wrong, so sorry if that is the case with this issue.

Let me explain...

Connecting with OrientDB this way works as expected:

import OrientDB from "orientjs";
const orientserver = OrientDB({
  host: 'localhost',
  port: 2424,
  username: 'admin',
  password: 'admin',
  enableRIDBags: false,
});
const db = orientserver.use('mydatabase');
db.exec('select * from content')
.then((x) => {
  console.log('response: ', x)
})

Just then I think, using the password admin for the user admin sounds very unsecure, so I went to change the password for admin in the orientdb-server-config.xml file.

Now when I execute the javascript again, the connection gets not established anymore. I have no idea, why the changed password isn't working anymore.

What would be the suggested way to handle this problem?

Thanks for your support.

ArnoBuschmann avatar May 06 '16 22:05 ArnoBuschmann

Hi @ArnoBuschmann

Admin is a database level user, so you have to change the password inside the db itself. Try to open the db from OrientDB Studio (localhost:2480) and access the "security" tab.

I hope it helps

Thanks

Luigi

luigidellaquila avatar May 07 '16 07:05 luigidellaquila

Hello @luigidellaquila,

Thanks for your quick response :)

Already tried that. When I add users in the security tab, give them admin roles and try to connect via orientjs as described above with their credentials I always get this error message:

message: 'Wrong user/password to [connect] to the remote OrientDB Server instance. Get the user/password from the config/orientdb-server-config.xml file'

Any idea what I else I could try?

Thanks, Arno

ArnoBuschmann avatar May 08 '16 01:05 ArnoBuschmann

Hi @ArnoBuschmann

Really no idea... it is a basic behavior, we have tons of test cases and hundreds of thousands of users that use it every day... for sure we are missing something.

Do you have something to share (Eg. your db and a node script) to reproduce the problem?

Thanks

Luigi

luigidellaquila avatar May 08 '16 07:05 luigidellaquila

hi @ArnoBuschmann

did you solve it?

const orientserver = OrientDB({
  host: 'localhost',
  port: 2424,
  username: 'admin',
  password: 'admin',
  enableRIDBags: false,
});

those are server user/password. You can find them in orientdb-server-config.xml

wolf4ood avatar May 09 '16 09:05 wolf4ood

Hi @luigidellaquila and @maggiolo00, thank you both for your assistance.

@luigidellaquila Yep it is basic behaviour and I don't think it is a bug. Probably I am doing something wrong, I just don't know what. Yes, I can share the DB and the node script if we can't get it fixed otherwise. How would I send it to you, via e-mail?

@maggiolo00 Yes I know they are server user/password in orientdb-server-config.xml So to clarify (maybe I am concerned at the wrong place): Could I keep the given password "admin" as it might be no security risk anyway because I just use it on a server side file to connect orientjs with the database?

Thanks, Arno.

ArnoBuschmann avatar May 10 '16 07:05 ArnoBuschmann

hi @ArnoBuschmann

yes you can send me to [email protected] if you still have problems.

wolf4ood avatar May 16 '16 08:05 wolf4ood

Thanks, Enrico! I just sent you an email.

ArnoBuschmann avatar May 17 '16 08:05 ArnoBuschmann

hi @ArnoBuschmann

did you solve it or do you still need help?

Thanks Enrico

wolf4ood avatar Jul 06 '16 09:07 wolf4ood