Auteur Topic: [OPGELOST] pgAdmin toegang tot OpenERP Postgres database  (gelezen 17857 keer)

Offline ton123

  • Bedankjes
  • -Gegeven: 8
  • -Ontvangen: 2
  • Berichten: 39
[OPGELOST] pgAdmin toegang tot OpenERP Postgres database
« Gepost op: 29 augustus 2012, 20:46:35 »
Ik heb dit onderwerp al ergens anders gemeld als aandachtspunt. Maar omdat onderwerp niet met al teveel techniek te vervuilen hierbij als apart topic.

Ik dacht dat de poorten 8169, 8170, 8171 en 3532 al openstonden, ze waren in iedergeval zichtbaar via een app op mijn Samsung Galaxy smartphone. Maar toch nog maar ook geopend in de synology firewall settings.
pgAdmin is een fijn beheertool voor postgres databases zoals OpenERP die gebruikt.
pgAdmin werkt via poort 5432 op de server. Het is handig als je kunt inloggen, echter dat is me nog niet gelukt. Ik heb zo'n beetje alle namen en paswoorden gebruikt die in aanmerking komen, dus ik vermoed dat de config files nu alleen maar localhost toegang geven.

File path voor de OpenERP6.1 toepassing:
/volume1/@appstore/OpenERP6.1/

cd /volume1/@appstore/OpenERP6.1/ brengt je daar.

Hierin bevindt zich ondermeer Openerp-server.conf
Met ls -al kun je zien wat nog meer.

File path voor de postgres database:
/usr/syno/pgsql/etc/
Hierin bevinden zich pg_hba.conf , pg_hba.conf.bak en postgresql.conf

Ik denk dat pg_hba.conf moet worden aangepast.

Bekijken en aanpassen met vi is voor mij een brug te ver.
Daarom leek het me handig om de 4 bovengenoemde files naar mijn Public schijf ALLEN te kopieren, te bestuderen, met write te editen en terug te kopieeren. Na een stop/start van de server zou ik dan nieuwe pogingen kunnen wagen.

Kopieeracties:
cp /volume1/@appstore/OpenERP6.1/Openerp-server.conf /volume1/ALLEN/
cp /usr/syno/psql/etc/pg_hba.conf /volume1/ALLEN/
cp /usr/syno/psql/etc/pg_hba.conf.bak /volume1/ALLEN/
cp /usr/syno/psql/etc/postgresql.conf /volume1/ALLEN/

De bestanden staan nu keurig gekopieerd op ALLEN.
Ik denk dat in pg_hba.conf een regel moet worden toegevoegd:
host     all    all    ip4adresvanpcmwaaroppgadmindraaid/32    trust

Nu heb ik 3 vragen:
1. Kan iemand dit bevestigen?
2. Ik kan pg_hba.conf.bak bekijken en muteren, maar pg_hba.conf krijg ik een foutmelding in windows dat ik onvoldoende rechten heb om te openen etc. Hoe dat op te lossen?
3. Ik vermoed dat ik misschien onvoldoende rechten heb om een gemuteerde pg_hba.conf terug te plaatsen. Kan iemand dat inschatten en oplossen?






INHOUD VAN pg_hba.conf.bak:

# 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  [OPTION]
# host       DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]
# hostssl    DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]
# hostnossl  DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]
#
# (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", a database name, or
# a comma-separated list thereof.
#
# 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.
#
# CIDR-ADDRESS specifies the set of hosts the record matches.
# 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.  Alternatively, you can write
# an IP address and netmask in separate columns to specify the set of hosts.
#
# METHOD can be "trust", "reject", "md5", "crypt", "password", "gss", "sspi",
# "krb5", "ident", "pam" or "ldap".  Note that "password" sends passwords
# in clear text; "md5" is preferred since it sends encrypted passwords.
#
# OPTION is the ident map or the name of the PAM service, depending on METHOD.
#
# Database and user names containing spaces, commas, quotes and other special
# characters must be quoted. Quoting one of the keywords "all", "sameuser" or
# "samerole" 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        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
##host    all         all         ::1/128               md5
host    all         OpenERP          0.0.0.0/0          md5

Offline ton123

  • Bedankjes
  • -Gegeven: 8
  • -Ontvangen: 2
  • Berichten: 39
Re: pgAdmin toegang tot OpenERP Postgres database
« Reactie #1 Gepost op: 10 september 2012, 16:26:40 »
Vanwege te gering aantal views en response wijk ik uit naar UK Global forum:

http://forum.synology.com/enu/viewtopic.php?f=184&t=56373
(Installatie en parameters)

http://forum.synology.com/enu/viewtopic.php?f=184&t=56371
(Document Management)

Ik hoop dat de pgAdmin toegang daar ook kan worden opgelost.

Offline ton123

  • Bedankjes
  • -Gegeven: 8
  • -Ontvangen: 2
  • Berichten: 39
Re: pgAdmin toegang tot OpenERP Postgres database
« Reactie #2 Gepost op: 13 september 2012, 21:12:58 »
Ik heb het vraagstuk zelf kunnen oplossen:
De database configuratie file pg_hba.conf moet worden aangepast om remote acces mogelijk te maken.
Gebruik putty, login als admin en paswoord van de synology.
vi /usr/syno/psql/etc/pg_hba.conf
Wijzig de regel host all OpenERP 0.0.0.0/0 md5 in
host all all ipadreswaaroppgAdmin3opdraaid/24  trust
(met i kom je in de insert en wijzigingen mode, met :wq opslaan en quit)
vervolgens een reload:
/usr/syno/pgsql/bin/pg_ctl reload

Het gevolg is dat je nu als je pgAdmin 3 op de remote computer opstart, dat je met naam PostgreSQL
database postgres en het database user=admin en password (zelfde als waarmee je in manage databases databases manipuleert) alle Postgres databases inclusief die voor alle synology interne multimedia databases kunt zien en manipuleren! :D  :D  :D  :D  :D


 

Synology users database.

Gestart door seba-swBoard Web Station

Reacties: 3
Gelezen: 2278
Laatste bericht 08 september 2008, 16:59:52
door Plerry
DS Audio via thuis netwerk geen toegang

Gestart door cvrBoard Audio Station

Reacties: 5
Gelezen: 2989
Laatste bericht 18 maart 2012, 12:13:00
door Tien
DSM mobile toegang vanaf iPod werkt niet

Gestart door gammetjeBoard Overige software

Reacties: 3
Gelezen: 2767
Laatste bericht 09 september 2011, 11:54:48
door gammetje
Netwerk led knippert zonder activiteit, toegang beperken?

Gestart door rijiBoard NAS hardware vragen

Reacties: 4
Gelezen: 1875
Laatste bericht 07 april 2013, 22:00:25
door riji
[Opgelost] trage file transfer DS213+

Gestart door rjozzieBoard NAS hardware vragen

Reacties: 63
Gelezen: 22637
Laatste bericht 25 juli 2013, 13:22:38
door rjozzie