Changing SYSDBA user password in InterBase

524 views Asked by At

I am working with InterBase 2020 version. Since InterBase installs with default user SYSDBA and default password for SYSDBA as masterkey , I want to change the password for SYSDBA user.

Using gsec tool I am able to change the password however when I backup the database and restore it on different machine having SYSDBA password as masterkey , I am able to do this successfully.

So even if I have changed the password on my machine , InterBase db backup (with changed SYSDBA password) could be restored on a machine having SYSDBA password as masterkey. Where is the security in this case and How could I prevent this ?

Is Embedded User Authentication a solution to prevent unauthorized users restoring the database ?

2

There are 2 answers

0
Arkadiusz Wolanski On

You have to activate Embedded User Authentication in your Database. So you can define different SYSDBA per Database with different password.

0
Deepak kumar jain On

I've found a solution for this. below Delphi components are used for this :

  1. TFDIBSecurity
  2. TFDPhysIBDriverLink

Below Delphi code could be used to change SYSBDA user password :

  FDIBSecurity1.DriverLink := FDPhysIBDriverLink1;
  FDIBSecurity1.Host := '127.0.0.1';
  FDIBSecurity1.UserName := 'SYSDBA';
  FDIBSecurity1.Password := 'masterkey';    // Original password
  FDIBSecurity1.AUserName := 'SYSDBA';      // User for which password needs to be changed
  FDIBSecurity1.APassword := 'N3wPa$$w0rd'; // new password
  FDIBSecurity1.ModifyUser;