View Single Post
  #5 (permalink)  
Old 10-25-2002, 11:03 PM
ozzi4648 ozzi4648 is offline
Registered User
 
Join Date: Sep 2002
Posts: 540
ozzi4648
[quote:342b03017d][i:342b03017d]Originally posted by iminteractive[/i:342b03017d]

Anyone know how to limit the amount of databases a perticular user can use?[/quote:342b03017d]

Say you have a customer who requires a postgresql db for his site. Lets also say that on this plan he is allowed (1) postgresql database and any additional ones have to be purchased for say $8 additional per month. But he only wants (1) so lets give it to him.


First, log in as postgres

Click on USER ADMIN&NEW USER
Enter his USERNAME, Place check mark in the CREATEDB box, and enter his PASSWORD. Click SAVE

Logout

Log in as the user. You will see that he has no db's yet so create one for him. In the center of your screen you will see a box that says, CREATE NEW DATABASE. Enter the name of the new database.

Logout

Now you want to make sure that he cannot create any more databases because our scenerio says he can only have one so we need to remove his access to create anymore.

Log back in as superuser, postgres:

Click on USER ADMIN&then click on the EDIT tab for the user.
REMOVE the check make from the users CREATE DB TAB and SAVE.

DONE!

Log back in as the user to check. You will notice that the CREATE DATABASE BOX is now gone and he has access to only one database, his own.

REMEMBER, a database created by a user is OWNED by that user. This is not true in the case of the postgres account. It has access to all databases including roots.
Reply With Quote