On Tue, Jul 14, 2015 at 12:40:19PM +0500, Sherzod Mutalov wrote:
I want to change default monetdb user password to other and create new database user when starting new database instance, before any client connects to newly created db.
I starting server with follow command:
mserver5.exe --dbinit="oldpwd := clients.backendsum(\"monetdb\"); newpwd := clients.backendsum(\"secret\"); clients.changePassword (oldpwd, newpwd); usrpwd:=clients.backendsum(\"secret2\"); clients.addUser(\"newuser\", usrpwd);" --dbpath="D:\Projects\git\ monetdb-latest-dev\NT\build\bin\dbfarm\demo" Adding users on the mal level isn't supported on the sql level.
Niels
There are no errors.
Then I trying to connect to this server:
mclient.exe -u monetdb -P secret
No errors, connected. Then, I am trying to open new session:
mclient.exe -u newuser -P secret2
Ooops! Client exits with error:
Connection terminated
Server unexpectedly dies. I restarted server, then try connect one more time, same behaviour: "Connection terminated".
Ok. Then I connected to server with default "monetdb" user and checked "users" table:
mclient.exe -u monetdb -P secret
sql>select * from users; +---------+---------------+----------------+ | name | fullname | default_schema | +=========+===============+================+ | monetdb | MonetDB Admin | 2000 | | newuser | null | null | +---------+---------------+----------------+ 2 tuples (5.332ms)
Look, fullname and default_schema for "newuser" is null. I think "null pointer dereference" somewhere in code.
If I creating user with SQL (CREATE USER ...) everything works fine, I can connect.
_______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
-- Niels Nes, Manager ITF, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: https://www.cwi.nl/people/niels e-mail: Niels.Nes@cwi.nl