473,395 Members | 1,652 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,395 software developers and data experts.

how to restrict a user from accessing a specific database?

when I create a user "user1" and give this user the permissions on a database "db1" (including login privilage), this user can access all databases although it doesn't have the privilges (even after implmenting the revoke command).
on the other hand, any user can access the database "db1"
after login, although I make (revoke all on database db1 from public ).

I need to restrict role "user1" to access only db1 and db2's sch_a and shc_f, and also don't show the other schemas in the same database. When listing databases, just two schemas should be shown (sch_a , sch_f).
Sep 28 '10 #1
2 9685
Mariostg
332 100+
It could be a problem in your pg_hba.conf file
http://developer.postgresql.org/pgdo...-hba-conf.html. See the database paragraph.
Sep 28 '10 #2
rski
700 Expert 512MB
For database you can use
Expand|Select|Wrap|Line Numbers
  1. revoke connect on <database> from <username>;
  2. revoke connect on <database> from public;
  3.  
for schemas revoke USAGE and CREATE privilege.

See here http://www.postgresql.org/docs/curre...ql-revoke.html
Sep 28 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: arabub | last post by:
I have an installation of Apache that apparently includes PHP (out of the box Redhat 9.0). If I make database calls to Postgresql, as what user is that call going to be made? The user that...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
4
by: jwa6 | last post by:
I have a user/pc specific problem in access. This doesn't occur on any other ( windows xp pc) that I have used the ..mbd on. This involves a query that's using a range of dates as a parm. This...
1
by: Fei Li | last post by:
Hi, Suppose my form has menu, tool bar, tool panel and drawing panel. How to restrict user mouse, say, in the area of tool bar and drawing panel? Thanks
1
by: Jurgen Haan | last post by:
Hiya... I'm trying to get db2 LUW 8.2.6 X86_64 working on a netapp. We're running SLES 10. The software and instance are created locally, but when I try to create a database on a path mounted...
5
by: SKS | last post by:
hi all i would like to know how to restrict user from entering numeric value ina textbox..using C# if user try to enter text it shouldnt be allowed.. i tried errror provider.. but it doesnt met...
1
by: khukeri | last post by:
Dear All, I am getting following message when i try to restart my database. I am using DB2 V 8.1 on windows. I am getting this error since my System as hard booted. I have searched for solution...
0
by: skyineyes | last post by:
Hi Can anybody provide information on accessing DB2 database through UNIX shell scripts.Any tutorial will ne highly appreciated. Thanks
4
by: simon2x1 | last post by:
i have a text box i mean textarea(<textarea></textarea>) in my page i want to restrict user no to post more than 40 character how can i do that
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.