473,387 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Prevent database user to access another database

Hi,

I have installed DB2 version 8.1 and created two databases, TEST1 and
TEST2. Two operating system users test1 and test2 are mapped to two
database users in TEST1 and TEST2 databases respectively.

Even though test2 user does not exists in TEST1 database, I am able to
connect to TEST1 database using test2 user. Also able to perform basic
operations like CREATE /DROP table. After creating tables, it creates
test2 SCHEMA and DB USER automatically in TEST1 database.

How do I prevent this behavior? How do I prevent test2 user connecting
to TEST1 database?

Thanks

Sameer

Jul 31 '07 #1
3 2024
On Jul 31, 6:56 am, S.M.Deshpa...@googlemail.com wrote:
Hi,

I have installed DB2 version 8.1 and created two databases, TEST1 and
TEST2. Two operating system users test1 and test2 are mapped to two
database users in TEST1 and TEST2 databases respectively.

Even though test2 user does not exists in TEST1 database, I am able to
connect to TEST1 database using test2 user. Also able to perform basic
operations like CREATE /DROP table. After creating tables, it creates
test2 SCHEMA and DB USER automatically in TEST1 database.

How do I prevent this behavior? How do I prevent test2 user connecting
to TEST1 database?

Thanks

Sameer
By default connect privilege is granted to public....revoke it.

Also, do some initial reading before posting.

Jul 31 '07 #2
On Jul 31, 10:59 am, janman <mjana...@hotmail.comwrote:
On Jul 31, 6:56 am, S.M.Deshpa...@googlemail.com wrote:
Hi,
I have installed DB2 version 8.1 and created two databases, TEST1 and
TEST2. Two operating system users test1 and test2 are mapped to two
database users in TEST1 and TEST2 databases respectively.
Even though test2 user does not exists in TEST1 database, I am able to
connect to TEST1 database using test2 user. Also able to perform basic
operations like CREATE /DROP table. After creating tables, it creates
test2 SCHEMA and DB USER automatically in TEST1 database.
How do I prevent this behavior? How do I prevent test2 user connecting
to TEST1 database?
Thanks
Sameer

By default connect privilege is granted to public....revoke it.

Also, do some initial reading before posting.
___________

<<Also, do some initial reading before posting.>>

If he knew where to look, he wouldn't have posted! Defaults are hard
for the novice to find, as there is no single place where one can go
to see all defaults for all the myriad choices. Similarly environment
variables are confusing, even their existence is cryptic, let alone
their defaults, if any.

You were once in that position -- be charitable and be happy to help
your colleague.

Aug 2 '07 #3
On Aug 3, 12:21 am, 2803s...@gmail.com wrote:
On Jul 31, 10:59 am, janman <mjana...@hotmail.comwrote:
On Jul 31, 6:56 am, S.M.Deshpa...@googlemail.com wrote:
Hi,
I have installed DB2 version 8.1 and created two databases, TEST1 and
TEST2. Two operating system users test1 and test2 are mapped to two
database users in TEST1 and TEST2 databases respectively.
Even though test2 user does not exists in TEST1 database, I am able to
connect to TEST1 database using test2 user. Also able to perform basic
operations like CREATE /DROP table. After creating tables, it creates
test2 SCHEMA and DB USER automatically in TEST1 database.
How do I prevent this behavior? How do I prevent test2 user connecting
to TEST1 database?
Thanks
Sameer
By default connect privilege is granted to public....revoke it.
Also, do some initial reading before posting.

___________

<<Also, do some initial reading before posting.>>

If he knew where to look, he wouldn't have posted! Defaults are hard
for the novice to find, as there is no single place where one can go
to see all defaults for all the myriad choices. Similarly environment
variables are confusing, even their existence is cryptic, let alone
their defaults, if any.

You were once in that position -- be charitable and be happy to help
your colleague.
Thanks for the reply though it wasn't interesting enough. So just read
and ignored it.

Other than DB2, I haven't seen any RDBMS which gives CONNECT privilege
to public that to by default. I think CONNECT its a powerful privilege
and I don't see any reason to be granted as default to public.

Usual practice is to create user and grant necessary privileges in
other RDBMS. I wouldn't have figured it out, if one of our developer
wouldn't have connected to wrong DB2 database. First of all I was
surprised that he got successful connection. While using Oracle,
SQLServer, PostgreSQL, MySQL, this behavior of DB2 is certainly
surprising to me.

Is there any reason why DB2 grant CONNECT privilege by default. Are
there any other potential privileges also that one needs to revoke?

Aug 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Douglas | last post by:
I have a frontend and backend database , program.mde and data.mdb on a client PC. How do i prevent them launching the program.mde more than once on a single PC? Somtimes they minizmise the program...
22
by: alecjames1 | last post by:
I have a form which the user must complete before closing. I have disabled the window x button and use my own exit button. When selected it checks to see if the user has completed the entries...
6
by: deko | last post by:
Is there a way to set a custom property on Access tables and/or queries to prevent them from being overwritten by import wizards? Any Access database can be easily destroyed if a user mistakenly...
8
by: Smartin | last post by:
I have a form in Access97 which facilitates a query against a production Access database. Users will enter some search terms and see a datasheet view of the results in a subform. The prod table is...
8
by: Arno R | last post by:
Hi all, Is the above possible? I guess I need an API call for this ? How and where to find this? One of my new apps is used as a sort of 'dedicated' thing. Users see an empty desktop with...
16
by: MLH | last post by:
If I give someone a runtime app, they can open the database window by pressing the F-11 key. How to prevent???
0
by: mmazid | last post by:
I would like to know how to prevent entering the same data as a primary key to an MS Access database and return with an error message confirming the data already exists in ASP.Net (VB.Net). ...
7
by: perryche | last post by:
Is there a way with MS Access 2002 and above to prevent people importing from a blank Database the tables in another database? I have done a lot of searches but there isn't really a solution that...
1
by: Luke Bailey | last post by:
I have an access database that I have secured using ueser-level security. I have my own logon in the Admins group. I have also removed Admin from the Admins group so that the standard end-user...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.