Differences between co-administrators and SYSDBA
-
Co-admins can create, alter and drop users, but contrary to
SYSDBA
they have no automatic privileges in regular databases. -
Unlike
SYSDBA
, co-admins must specify theRDB$ADMIN
role explicitly if they want to exert their rights as system administrator:connect security.db user bigbill password bigsekrit7foryou role rdb$admin
For 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$ADMIN
privileges 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$ADMIN
role in a database gives the granteeSYSDBA
rights 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$ADMIN
role 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 bigbill
Grantors can be the database owner,
SYSDBA
, and every other user who has theRDB$ADMIN
role in that database and has specified it while connecting.EveryRDB$ADMIN
member in a database can pass the role on to others, so again there is noWITH ADMINOPTION
.