On 02/04/2024 15:56, Nick Vaughan wrote:
> I'm trying to create databases and users in Firebird 3.0 on Xubuntu
> without having to go through the root account. I proposed a way of doing
> this (See "On Xubuntu Fireball 3.0 only accessible through root account"
> entry timed 26 Mar 2024, 15:05:49 - you can find below the proposed steps.)
>
> Given that the employees database isn't installed a key step is to be
> able to connect to the Security database (even though Firebird3.0
> doesn't use it). I thought that I would isolate and try this step.
Firebird 3.0 does use the security database. Only, when you use
embedded, it does not perform authentication, so you don't have to
provide a password and you can fundamentally connect with any *Firebird*
user to a database.
Connecting to the security database (or any other database) and creating
a user has nothing to do with avoiding or not avoiding root. It is about
creating user credentials for connecting through the Firebird server,
and for being able to give the create database privilege to a *Firebird*
user (unrelated to the *OS* user).
[..]
> When I go into isql-fbunder the SYSDBA user I get
>
> nick@Aspire-one-1-131:~$ isql-fb -u SYSDBA -p PPPPPPP
> Use CONNECT or CREATE DATABASE to specify a database
> SQL> CONNECT security.fb;
> Statement failed, SQLSTATE = HY000
> operating system directive access failed
> -Not a directory
> SQL>
Did you add yourself to the firebird group?
That said, doing that will not help much for connecting to the security
database. If the firebird service is running, then the security database
is opened exclusively by the Firebird process. You would need to stop
the Firebird service first.
I just checked on my Ubuntu VM, and connecting to security.db will work
(if the server isn't running and if you are a member of the firebird
group). On Ubuntu, the security database is located in
/var/lib/firebird/3.0/system/security3.fdb, and as XUbuntu seems to use
the same package, I expect it to exist there as well
However, instead, should create a database through the Firebird service,
and use that to create additional Firebird users.
> Using catfish to search for "security3" failed to find any files with
> that name.
>
> Can anyone please say how I might find the security database or another
> way of connecting to a database without having to go through the Xubuntu
> root account?
Adding yourself to the firebird group (and reloading with newgrp
firebird) should do it.
In any case, I'll try to find time to setup a new VM and walk through
installing Firebird again to see if I missed a step here.
Mark
--
Mark Rotteveel