1

When I try anything in isql, I get the message:

Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
unable to open database

When I try to create the user I still get the message:

C:\Program Files\Firebird\Firebird_3_0>gsec -user sysdba -password masterkey
use gsec -? to get help
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
unable to open database

But I am the administrator, and I installed it.

How do I create the user SYSDBA in Firebird?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Guido Kleijer
  • 559
  • 1
  • 5
  • 7
  • The _unable to open database_ error suggests that your problem is not actually with the absence of the SYSDBA account, but might indicate that your Firebird process cannot access the security database. How are you running Firebird, and are you sure the user running the Firebird server has sufficient rights to read and write the security3.fdb file? – Mark Rotteveel Dec 11 '20 at 16:54
  • This can for example occur if you installed Firebird in C:\Program Files, but are running Firebird as an application, not as a service. – Mark Rotteveel Dec 11 '20 at 16:59
  • I'm running it as a Service – Guido Kleijer Dec 14 '20 at 08:54

2 Answers2

1

The combination of the "Your user name and password are not defined. Ask your database administrator to set up a Firebird login." with "unable to open database" does not mean the SYSDBA account does not exist, it means that the Firebird process was unable to open the security database to perform authentication.

This can happen if you installed Firebird in C:\Program Files, and you are running the Firebird server as an application (instead of as a service) and UAC is enabled, or you are running as a service, but the user account running the service has insufficient rights to read and write to the security3.fdb file.

You either need to run Firebird as a service (e.g. as configured by the installer), or - if you really want to run Firebird as an application - install Firebird outside of C:\Program Files.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • I'm running Firebird as a Service, it's installed in C:\Program Files (default installation) – Guido Kleijer Dec 14 '20 at 08:56
  • As the help sugested, you should be able to set the SYSDBA password during installation, but i didn't found this option. a second sugestion mentioned in the help is a generated file containing the password, but i couldn't find this one either. – Guido Kleijer Dec 14 '20 at 08:58
  • @GuidoKleijer Having a generated password in a file only applies to Linux, on Windows, the installer will ask you to enter the SYSDBA password (in the page after 'Select Additional Tasks'), however this page is skipped if you install into a location that already contains a `security3.fdb` (i.e. from a previous install). In any case, I can only reproduce the errors you have if I run Firebird as an application, or if I configure the service with an account that has insufficient read and write rights to the `security3.fdb` file. – Mark Rotteveel Dec 14 '20 at 10:15
  • @GuidoKleijer By default, the service will be run by the Local System Account. Check if that is actually the case, and check if the SYSTEM account has 'Full Control' on the `security3.fdb` file in `C:\Program Files\Firebird\Firebird_3_0`. – Mark Rotteveel Dec 14 '20 at 10:18
  • SYSTEM account has full control on security3.fdb – Guido Kleijer Dec 14 '20 at 14:21
  • as you mentioned, there where old installation files preventing the installer to set a password. – Guido Kleijer Dec 14 '20 at 16:11
0

How do I create the user SYSDBA in Firebird?

Connect to any database (security.db or employee) in embedded mode using user name SYSDBA (password is not needed in this mode) and issue SQL command "CREATE USER" as described in Firebird Language Reference.

You can learn more about embedded mode from Firebird 3.0 Release Notes.

user13964273
  • 1,012
  • 1
  • 4
  • 7
  • Although that is correct in general, it is not the actual problem the OP has. – Mark Rotteveel Dec 12 '20 at 11:45
  • Yes. But following these steps can help them to learn more about Firebird and troubleshoot the problem. If the problem is a general connection error - they will find it out at once without distortion from misleading "user name is not defined" message. – user13964273 Dec 12 '20 at 16:56