Firebird user for remote connection - firebird

The Firebird DB is running on Windows machine. I can connect remotely to the database via alias and run select query on one of the tables, but only if login as SYSDBA user. But I need to do that if login as a user with limited rights.
For that I have created a Firebird user via add command of GSEC. Then I granted select rights to the table for that user via isql. If login locally as created user I can succesfully run a select query on the table.
Unfortunately such user configuration is not sufficient to run select query from my C# app running on remote machine.
What should be changed to make it working?

Related

Azure SQL dbmanager/loginmanager can create but not access database

I have created a new sql account and assigned it dbmanager and loginmanager roles. It can be used to create new databases but I am not able to access the database afterwards with that user. When right clicking the new database to run a query, the login prompt apears and says that the security principal %user% can access the database under the current security context.
I am not able to alter or grant user any access to the DB now that I can't even run any queries.
The purpose here is that I have a powershell script that creates the databases and handles the automation under a spesific SQL user. What am I missing?
The login might lacks the necessary permissions to connect to the specified database. Logins that can connect to this instance of SQL Server but do not have particular database rights inherit the guest user's permissions. This is a security feature that prevents users from connecting to databases where they do not have permissions. When the guest user does not have CONNECT permission to the identified database and the trustworthy attribute is not set, this error message appears. When the guest user does not have CONNECT authorization to the listed database, this error message appears.
You can connect to the database in one of the following ways:
Grant the specific login access to the named database.
Grant the CONNECT permission to the database named in the error message for the guest user.
Enable the TRUSTWORTHY property on the database that has authenticated the user.
Please refer to the Microsoft Document for this error: MSSQLSERVER_916

Firebird default user not set

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?
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.
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.

Firebird permission denied when connecing with FlameRobin but is okay with isql

I'm trying to connect to employee.fdb in Firebird3.0 (localhost) using FlameRobin 0.9.3 on a Ubuntu OS.
The connection to Firebird using isql has no issues. I can create users, roles, etc all from the terminal. However, when I attempt to make a connection using FlameRobin I receive a 335544344 "Error while trying to open file Permission denied" response.
This occurs with the SYSDBA profile and any other new user profiles that I create in isql. I can even create new users in FlameRobin but I cannot connect to any database. I've verified in /etc/firebird/3.0/firebird.conf that DatabaseAccess = Full and have attempted to access the db from a couple different folders in case this is a read/write issue. No success.
I feel like I'm missing something obvious. Any thoughts?
Added info in response to Mark (4/26):
The db is stored in /var/lib/firebird/3.0/data/. I have assumed this to be the default location for Firebird DBs and that the server automatically has access to it, but I suppose that might not be the case. Is there a way to confirm server permissions to this directory and/or is this the customary spot to store work?
Terminal Connection with ISQL:
daniel#daniel-desktop:~$ isql-fb
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect '/var/lib/firebird/3.0/data/employee.fdb' user sysdba password 'xxxxxxx';
Database: '/var/lib/firebird/3.0/data/employee.fdb', User: SYSDBA
SQL>
FlameRobin Database Registration Info:
FlameRobin Error:
This is a permissions issue as #MarkRotteveel suggested. Problem was that I installed the server as a user and not as root. Problem solved by removing and reinstalling both Firebird and FlameRobin as root.

Postgres user create database

I am unable to create databases using my postgres client with the user I log in as.
I am having trouble figuring out how increase the privileges of my user. I have access to the linux server running postgres and am able to use psql to log on as my user and as the postgres user.
Can someone tell me what commands I should run to allow my user to create databases on my server through the postgres GUI running on a remote host?
Many thanks,
I donĀ“t know of a postgres GUI, but here's how to do it in the psql-console (logged in as the superuser):
=> ALTER USER your_username CREATEDB;
See http://www.postgresql.org/docs/current/interactive/sql-alteruser.html for more info.

User authorization in DB2

I am using win Vista, and I am trying to backup some Database under DB2.
I am logged in using the Administrator user, and whenever I try to issue the backup command in the "command line processor", I get the following message:
SQL1092N "ADMINISTRATOR" does not have the authority to perform the requested command. SQLSTATE=00000
BTW, I have created a username/password pair (db2admin) while installing the DB2 server.
So, Will this problem will be get solved if I use the db2admin user? And how to connect to the server (local server BTW) using the db2admin user ?
I had this problem recently and this seemed to do the job:
Attach to your [local] node. (the value of your DB2INSTANCE environ variable, mine was 'DB2'):
attach to DB2 user db2admin using mypassword;
If this isn't enough (it didn't seem to be with me), you can also specify the user and password with backup and restore commands:
restore database mydbname user db2admin using mypassword from C:\BACKUPS taken at 20100823132457;
Or manually create the db2admin user with a password on Windows. But I'm not sure if that's the correct option here.