0

I got a computer which has already installed Firebird database 2.0. And now I need to open fdb files which are Firebird database files just on this computer. So what I need is to get the password of Firebird server.

I've tried the default user and password :SYSDBA and masterkey and it doesn't work.

I've also tried to copy the fdb files to another computer on which I installed the same version Firebird. Those files can be opened on that computer, but what I need is to get the username and password and connect to database on this machine rather than open on another computer.

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

Arioch 'The
  • 15,799
  • 35
  • 62
Joken yan
  • 38
  • 1
  • 7
  • @Mark Rotteveel - your answer in the linked question was tailored for FB 3, which was specified by TS of that question. Here however FB 2.x is specified instead. In authentication department they are not quite duplicates. Maybe we should edit both questions to mark FB2/FB3 in the very titles. – Arioch 'The Dec 21 '18 at 09:19
  • @Arioch'The Given most options also apply to earlier versions, I've added some caveats about Firebird 2.5 and earlier. – Mark Rotteveel Dec 21 '18 at 09:21

1 Answers1

0

I will assume you computers run under Microsoft Windows.
Things are a bit different in UNIX w.r.t. location of security database and details of using Embedded edition of FB.
However before the question got edited Windows was specified: https://stackoverflow.com/revisions/53881670/1


I've tried the default user and password :SYSDBA and masterkey and it doesn't work.

In which program?

If there is some 3rd-party application its login/password pairs might well be different from ones of the Firebird server itself.


security2.fdb in the Firebird 2.x installation folder contains users and password hashes. So, depending upon what you actually need, you have two ways:

  1. Remove all passwords, except for SYSDBA/masterkey. That is: remove the Firebird. Ensure that "security database" was removed too (if not - rename it or move to another folder). Reinstall Firebird afresh. Would let you peep into the database using development tools (IBExpert/FlameRobin/FirebirdMaestro and so forth) but would probably screw any 3rd-party applications that used that database (as that application's users would be no more existing in the FB server).

  2. Clone users/passwords from old computer to new one. That is, after installing matching Firebird versions on both computer you would have to STOP the FB service on both computer, then copy the "security database" from old to new computer, then START the FB service on both computers. This would probably make the 3rd party application work, but not let you use SYSDBA/masterkey with development tools.

In both cases you would also have to look into UDF sub-folder in Firebird installations - if there are some non-standard plugin DLLs there you might need to copy them to the new Firebird installation too, as some parts of the database might be dependent upon those (or not, but you do not know before you open the database).


Actually, there might be yet another route for a short-term peeping into the database. Download and unpack Firebird 2 Embedded edition. STOP (temporarily or even forever) the normal Firebird service on that computer (so the database file would no more be locked). Use the embedded Firebird (fbEmbed.dll) as the "client library" in one of the aforementioned developer tools. With Embedded server editions user password just does not matter.

Arioch 'The
  • 15,799
  • 35
  • 62