Subject Re: [firebird-support] Problems with creating new users (no permission for INSERT access to TABLE PLG$VIEW_USERS)
Author Bryan Cole
On Tue, 2018-12-18 at 14:56 +0100, Dimitry Sibiryakov sd@... [firebird-support] wrote:
18.12.2018 14:44, 'Bryan  Cole' bryan.cole@... [firebird-support] wrote:
I understand I'm doing it wrong. I don't understand what I need to do different. I've read all the documentation (really!).

If you could give me a working example, that would be awesome.

 >isql -u sysdba -p masterkey localhost:employee
SQL> CREATE USER test PASSWORD 'test' GRANT ADMIN ROLE;
SQL> grant RDB$ADMIN to user test;
SQL> commit;
 >isql -u test -p test -role RDB$ADMIN localhost:employee
Database: localhost:employee, User: TEST, Role: RDB$ADMIN
SQL> CREATE USER test1 PASSWORD 'test';
SQL> show users;
Users in the database
   0  SYSDBA                              1 #TEST
   0  TEST1


Thanks for the example. I do appreciate this. Sadly, I still have the same problem:

[bryan@bryan RPMS]$ isql-fb -user SYSDBA -pass pythagorus localhost:employee
Database: localhost:employee, User: SYSDBA
SQL> DROP USER test;
SQL> CREATE USER test PASSWORD 'test' GRANT ADMIN ROLE;
SQL> grant RDB$ADMIN to user test;
SQL> commit;
SQL> exit;
[bryan@bryan RPMS]$ isql-fb -user test -pass test -role RDB$ADMIN localhost:employee
Database: localhost:employee, User: TEST
SQL> CREATE USER test1 PASSWORD 'test1';
Statement failed, SQLSTATE = 28000
add record error
-no permission for INSERT access to TABLE PLG$SRP_VIEW
SQL> show users;
Users in the database
  1 #TEST                              
SQL> exit;
[bryan@bryan RPMS]$ 


Do I need to define the RDB$ADMIN role before hand? Seems like the user 'test' isn't getting the RDB$ADMIN role assigned on connect.

Ideas?

Thanks,
Bryan

-- 
Group Leader, Technical Development Group - Teraview Ltd.
Platinum Building, St. John's Innovation Park, Cambridge CB4 0DS, UK.
tel: +44 (0)1223 435386, fax: +44 (0)1223 435382, web: www.teraview.com Registered Number: 04126946, VAT Number: 770 8883 84

...preferred document formats: ODF (ISO/IEC 26300:2006), PDF