Page 1 of 1

IBCConnect.Connect succeeds with blank username & blank pwd

Posted: Fri 07 Nov 2008 18:45
by MahoneyH
Hello,

I have tried to find the reason for this but I am out of ideas. In my Delphi 2007 program (IBDAC 2.70.0.41) I have the code:

try
DataMod.MeBrConnection.Connect;
except
ShowMessage('Failed to connect to database.');
Application.Terminate;
end;

So the default connection dialog shows up. If I have a blank username and blank password and click on the Connect button the connection to the Firebird database succeeds.

I can access the tables I created. I created them as SYSDBA which has a password. I don't even know what user I am logged in as. I have 6 other users defined in the server, all of which have passwords.

I can find nowhere in the properties of any objects where a username and password could be hidden. Its not in the TIBCConnection object.

If I enter a username and no password or an incorrect password I get no message. The login dialog just stays there waiting for correct information or a cancel. This is ok, but I don't think it is how it should work.

Does anyone have any ideas? I really don't want to be able to connect without a username.

Thanks
Hardee Mahoney
Washington, DC

Posted: Sat 08 Nov 2008 08:52
by Archer66
Are you using Firebird Embedded ?

IIRC using Embedded you don't need username and password.

Posted: Sun 09 Nov 2008 13:09
by MahoneyH
Thank you for your response.

I am using Firebird 2.1 latest build. I am connecting over TCPIP to a server on a remote machine.

I have looked on that machine for the username and password being saved some where but I can't find it. Same on the the client machine.

Posted: Sun 09 Nov 2008 15:03
by Archer66
Check firebird.conf file if Firebird is using trusted authentication.

From Firebird documentation:

"The new parameter Authentication has been added to firebird.conf for configuring the authentication
method on Windows. Possible values are.-

Authentication = Native
Provides full compatibility with previous Firebird versions, avoiding trusted authentication.

Authentication = Trusted
The Security database is ignored and only Windows authentication is used. In some respects, on Windows this is more secure than Native, in the sense that it is no less and no more secure than the security of the host operating system.

Authentication = Mixed
This is the default setting.
To retain the legacy behaviour, when the ISC_ USER and ISC_ PASSWORD variables are set in the environment, they are picked and used instead of trusted authentication."

Posted: Mon 10 Nov 2008 13:15
by MahoneyH
Thank you so much. That was the problem.

Hardee Mahoney
Washington, DC