On 11-05-2023 13:17, Kevin Stanton wrote:
> I am wondering if there is a way to determine from a query what security
> database is being used for a specific database.
Not entirely, but you can query
```
select MON$SEC_DATABASE from MON$DATABASE
```
This will return Default (using the security database referenced in
firebird.conf setting SecurityDatabase), Self (configured in
databases.conf to refer to itself) or Other (configured in
databases.conf to refer to a different database)
> I've also tried to set up "local users" and have been unsuccessful so far.
>
> This does not appear to work (database.conf file) :
>
> ledb = e:\fb3\lumber\lumber_inv.fdb
> {
> SecurityDatabase = ledb
> }
>
> I need to do some more testing here.
What do you mean with "this does not appear to work"?
If you configure a security database like that, you will first need to
attach with an embedded connection as SYSDBA to create the first user
(which will initialize the DB with the relevant tables), otherwise it is
impossible to attach remotely as authentication will fail for lack of
existence of the required tables. And if you want to be able to create
users over a non-embedded connection, then you'll need to ensure the
user is SYSDBA, or is a user that has the RDB$ADMIN role, or - Firebird
4.0 and higher - the user needs to have the USER_MANAGEMENT system
privilege.
Mark
--
Mark Rotteveel