[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Postgresql setup on Debian system




2013/12/11 Gary Roach <gary719_list1@verizon.net>
On 12/10/2013 11:13 PM, Raffaele Morelli wrote:
BTW you are not clear: what are you trying to achieve?
Not too surprising that I wasn't clear. I feel like I'm floundering around. I am trying to build a data archiving system that will have multiple levels of users and has a web page access system. Python, Django, html and _javascript_ will take care of most of the project. I just need to get the permissions setup for Postgresql. Thanks for pointing out Chapter 19 of the manual. I haven’t read it yet but will do so asap. I guess I am primarily struggling with the setting up of accounts and roles; which I guess is about 90% of the database setup. I probably need to just read more and hope for the best.

Gary R.

you are using a frontend that should keep care of user permissions, then you should create one role (user) on postgres with all permission on a database he must own.

so, as user postgres create a role for the frontend (eg. groach), then log into postgres as groach and create a database (eg. mydatabase). 
pgadmin or phppgadmin are your friends if you're not familiar with terminal interfaces in doing this.

next add the relevant line to your pg_hba.conf (first line is for clarity). this will grant connection to database `mydatabase` to user `groach` from all ip addresses, using md5 encryption method.

# TYPE  DATABASE        USER            ADDRESS                 METHOD
host        mydatabase        groach            all                                 md5

Reply to: