Differences between co-administrators and SYSDBA
-
Co-admins can create, alter and drop users, but contrary to
SYSDBAthey have no automatic privileges in regular databases. -
Unlike
SYSDBA, co-admins must specify theRDB$ADMINrole explicitly if they want to exert their rights as system administrator:connect security.db user bigbill password bigsekrit7foryou role rdb$adminFor reasons explained elsewhere in this guide, connecting to the security database like this may fail if a Superserver is running.On Windows, you may circumvent this by prepending
xnet://to the database path or alias, but on POSIX, you’re stuck.The only solution there is to connect to a regular database through the server, for example usinglocalhost:employee.(This must be a database that uses the security database in question.)Since Firebird 4.0, a co-admin no longer needs to have the
RDB$ADMINprivileges in the regular database to be able to execute user management statements against the security database, their privileges in the security database are sufficient.NotePlease rememberThe
RDB$ADMINrole in a database gives the granteeSYSDBArights in that database only!-
If it is the security database, the grantee can manage user accounts, but has no special privileges in other databases.
-
If it is a regular database, the grantee can control that database like they are
SYSDBA, but again they have no special privileges in other databases, and have no user administration privileges.
Of course, it is possible to grant a user the
RDB$ADMINrole in several databases, including the security database. -
-
To grant a user admin rights in a regular database you can use the usual way that roles are granted:
grant rdb$admin to bigbillGrantors can be the database owner,
SYSDBA, and every other user who has theRDB$ADMINrole in that database and has specified it while connecting.EveryRDB$ADMINmember in a database can pass the role on to others, so again there is noWITH ADMINOPTION.