Thread: solution to make static changes in pg_hba.conf file?

solution to make static changes in pg_hba.conf file?

From
"Tarun Sharma"
Date:
hi,
 
i assigned super user privelledge to a user by specifing entries in pg_hba.conf file as
 
host    all    newuser    127.1.1.1 md5
 
and the default postgres user is made access to only the default postgres databse and is no more the super user.
 
the problem is that this conf file is available to all and can be changed again.
 
can someone assist me with a solution to make this changes static.
thanks
happy new year:-)

Disclaimer :- This e-mail and any attachment may contain confidential, proprietary or legally privileged information. If you are not the origin al intended recipient and have erroneously received this message, you are prohibited from using, copying, altering or disclosing the content of this message. Please delete it immediately and notify the sender. Newgen Software Technologies Ltd (NSTL) accepts no responsibilities for los s or damage arising from the use of the information transmitted by this email including damages from virus and further acknowledges that no bin ding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of NSTL.

Re: solution to make static changes in pg_hba.conf file?

From
Magnus Hagander
Date:
2009/12/30 Tarun Sharma <tarun.sharma@newgen.co.in>:
> hi,
>
> i assigned super user privelledge to a user by specifing entries in pg_hba.conf file as
>
> host    all    newuser    127.1.1.1 md5
>
> and the default postgres user is made access to only the default postgres databse and is no more the super user.
>
> the problem is that this conf file is available to all and can be changed again.
>
> can someone assist me with a solution to make this changes static.

Only root, or someone who at least has full permissions on the
PostgreSQL datafiles, can do this by default. If you have granted
other users access to do it, you sohuld revoke those. One way can be
to move the pg_hba.conf file to a different directory and lock down
the permissions there.

-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/