Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Adding privilege for PostgreSQL to access the databases from any point in network - A...

Página 1 de 8

HOME ABOUT CONTACT ERROR PAGE

HOME

Home / Adding privilege to postgres / Adding privilege for PostgreSQL to access the databases from any point in netw

ADDING PRIVILEGE FOR POSTGRESQL TO ACCESS THE


DATABASES FROM ANY POINT IN NETWORK
00:39  SAJEEV SAHADEVAN

In my local network each machine may have PostgreSQL database. For accessing the PostgreSQL
databases in one machine to any machine, we need to add some permissions to
the PostgreSQL configuration file.

For accessing PostgreSQL databases in Machine1 to Machine2, we need to change the file pg_hba.conf
(C:\Program Files\PostgreSQL\9.2\data).
The changes are the following :

Add the line on IPv4 local connections :

host all all 0.0.0.0/0 trust

Hence the final code as :

# IPv4 local connections:


host all all 127.0.0.1/32 md5

host all all 0.0.0.0/0 trust

The file pg_hba.conf has attached here. Just replace the file in the location C:\Program Files\PostgreSQL
\data.

http://tekadempiere.blogspot.com/2014/04/adding-privilege-for-postgresql-to.html 23/03/2017
Adding privilege for PostgreSQL to access the databases from any point in network - A... Página 2 de 8

# PostgreSQL Client Authentication Configuration File


# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
# documentation for a complete description of this file. A short
# synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
#
# local DATABASE USER METHOD [OPTIONS]
# host DATABASE USER ADDRESS METHOD [OPTIONS]
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
#
# (The uppercase items must be replaced by actual values.)
#
# The first field is the connection type: "local" is a Unix-domain
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
# plain TCP/IP socket.
#
# DATABASE can be "all", "sameuser", "samerole", "replication", a
# database name, or a comma-separated list thereof. The "all"
# keyword does not match "replication". Access to replication
# must be enabled in a separate record (see example below).
#
# USER can be "all", a user name, a group name prefixed with "+", or a
# comma-separated list thereof. In both the DATABASE and USER fields
# you can also write a file name prefixed with "@" to include names
# from a separate file.
#
# ADDRESS specifies the set of hosts the record matches. It can be a
# host name, or it is made up of an IP address and a CIDR mask that is
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
# specifies the number of significant bits in the mask. A host name
# that starts with a dot (.) matches a suffix of the actual host name.
# Alternatively, you can write an IP address and netmask in separate
# columns to specify the set of hosts. Instead of a CIDR-address, you

http://tekadempiere.blogspot.com/2014/04/adding-privilege-for-postgresql-to.html 23/03/2017
Adding privilege for PostgreSQL to access the databases from any point in network - A... Página 3 de 8

# can write "samehost" to match any of the server's own IP addresses,


# or "samenet" to match any address in any subnet that the server is
# directly connected to.
#
# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi",
# "krb5", "ident", "peer", "pam", "ldap", "radius" or "cert". Note that
# "password" sends passwords in clear text; "md5" is preferred since
# it sends encrypted passwords.
#
# OPTIONS are a set of options for the authentication in the format
# NAME=VALUE. The available options depend on the different
# authentication methods -- refer to the "Client Authentication"
# section in the documentation for a list of which options are
# available for which authentication methods.
#
# Database and user names containing spaces, commas, quotes and other
# special characters must be quoted. Quoting one of the keywords
# "all", "sameuser", "samerole" or "replication" makes the name lose
# its special character, and just match a database or username with
# that name.
#
# This file is read on server startup and when the postmaster receives
# a SIGHUP signal. If you edit the file on a running system, you have
# to SIGHUP the postmaster for the changes to take effect. You can
# use "pg_ctl reload" to do that.

# Put your actual configuration here


# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.

# TYPE DATABASE USER ADDRESS METHOD

# IPv4 local connections:


host all all 127.0.0.1/32 md5
host all all 0.0.0.0/0 trust

http://tekadempiere.blogspot.com/2014/04/adding-privilege-for-postgresql-to.html 23/03/2017
Adding privilege for PostgreSQL to access the databases from any point in network - A... Página 4 de 8

# IPv6 local connections:


host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5

Share on Facebook Share on Twitter Share on Google Plus

About sajeev sahadevan

This is a short description in the author block about the author. You edit it by
entering text in the "Biographical Info" field in the user admin panel.

RELATED POSTS

 BLOGGER COMMENT  FACEBOOK COMMENT

0 comments:

Enter your comment...

Comment as: Select profile... 

Publish Preview

http://tekadempiere.blogspot.com/2014/04/adding-privilege-for-postgresql-to.html 23/03/2017
Adding privilege for PostgreSQL to access the databases from any point in network - A... Página 5 de 8

Newer Post Home

Unordered List

Popular Video Category

Post
Installation of Adempiere
on Windows
This installation instruction
is intended for initial installations
where the database, application
server and client all r...

Adempiere Schema
Diagram
From the below mentioned link, you
may get the entire table schema in
adempiere.
http://globalqss.com/idempiere/1.0c/
schemaspy/MaterialMa...

How can I change


appearance of webui login
page?
In trunk/zkwebui/theme/default
there are a couple of files: login-
left.zul, vendor-logo.zul, version-
info.zul etc. File version-info.z...

Send Email
Through
Adempiere
Send Email
Through Adempiere E-Mail
Configuration in Adempiere Mail
Server This will specify the mail
serv...

Tuning postgresql for


better performance
PostgreSQL is a highly
customizable relational database

http://tekadempiere.blogspot.com/2014/04/adding-privilege-for-postgresql-to.html 23/03/2017
Adding privilege for PostgreSQL to access the databases from any point in network - A... Página 6 de 8

management system (RDBMS) with


a dazzling array of configuration
options. The p...

To Debug Adempiere Web


UI or Server
1. Open
Adempiere\jboss\bin\run.bat 2.
There is a command "rem set
JAVA_OPTS=-Xdebug
-Xrunjdwp:transport=dt_socket,addr
ess=8787,ser...

Sending SMS using java


code and Clickatell API
ClickatellSMS .java /** * For
executing the code you may need
the following requirements 1.
Clickatell * account : You may have
a user...

Message box in ADempiere


ADempiere have its own standard in
its pop up messages. Normally we
can use JOptionPane provided by
java. But you need to compromise
its l...

Popup
Message from
Server to
Clients using
Socket
Programming in Adempiere
It will be more convenient for the
client if he get a popup notification
at the time of order completion. We
achieved this using Socket ...

Deploy
ADempiere
reports as
attachment
You can now deploy the jasper
report source (.jrxml) or compile file

http://tekadempiere.blogspot.com/2014/04/adding-privilege-for-postgresql-to.html 23/03/2017
Adding privilege for PostgreSQL to access the databases from any point in network - A... Página 7 de 8

(.jasper) as attachment to the


jasper report process . Use the
spe...

FIND US ON
FACEBOOK

POPULAR POSTS LABELS FLICKR IMAGES

Installation of Adempiere 8080 port is already in


on Windows use

This installation
add external jar in
instruction is intended for ... adempiere

Adempiere Schema Adding privilege to


postgres
Diagram
From the below mentioned
ADempiere
link, you may get the entire
table schema ...
adempiere in Ubuntu

How can I change adempiere installation


appearance of webui
login page? Adempiere Report
In trunk/zkwebui/theme/default attachments
there are a couple of files ...
ADempiere Reports
Send Email
ADempiere Tips
Through
Adempiere
ADempiere WebUI
Send Email
Through Adempiere E-Mail
ADempiere with SMS
Configuration in ...

ant build order


Tuning postgresql for
better performance Automatic DB backup
PostgreSQL is a highly
customizable relational Debug adempiere server
database management ...
Git
To Debug Adempiere
Web UI or Server how to kill the engaged
port

http://tekadempiere.blogspot.com/2014/04/adding-privilege-for-postgresql-to.html 23/03/2017
Adding privilege for PostgreSQL to access the databases from any point in network - A... Página 8 de 8

1. Open Making repository


Adempiere\jboss\bin\run.bat 2.
There is a command "rem ... Message box in
ADempiere

Sending SMS using java MySQL Clustering


code and Clickatell API
ClickatellSMS .java /** * For Notification in adempiere
executing the code you may
need ... Performance
improvement
Message box in
Popup in adempiere
ADempiere
ADempiere have its own
Port is already in use
standard in its pop up
messages. Normally we ...
Schedule Backup in
ADempiere
Popup
Message Sending Email in
adempiere
from Server
to Clients
Sending SMS using Java
using Socket
Programming in
Tuning postgreSql
Adempiere
It will be more convenient for
the client if he get a popup ...

Deploy
ADempiere
reports as
attachment
You can now deploy the jasper
report source (.jrxml) or
compile ...

Created By OpenSource Crew & http://tekadempiere.blogspot.in/

HOME ABOUT CONTACT ERROR PAGE

http://tekadempiere.blogspot.com/2014/04/adding-privilege-for-postgresql-to.html 23/03/2017

You might also like