3 Tabellen davon 2 Tabellen in der Haupttabelle übernehmen

die Art der erforderlichen Authentifizierung kannst Du via der pg_hba.conf anlegen, diese ist im data_dir gleich neben der postgresql.conf.
 
Werbung:
Hi, die schaut aktuell so aus

auschnitt der
pg_hba.conf

Code:
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local   all             postgres                                md5

# TYPE  DATABASE        USER            ADDRESS                 METHOD
local   micky_db           micky                                  md5

# "local" is for Unix domain socket connections only
#local   all             all                                     peer
local   all             all                                     md5
# IPv4 local connections:
host    all             all             192.168.100.0/24            trust
host    all             all             192.168.10.0/24            trust
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5
 
meinst du so ?

Code:
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
#local   all             postgres                                md5
host    all             postgres                                trust

# TYPE  DATABASE        USER            ADDRESS                 METHOD

local   micky_db        micky                                   md5


# "local" is for Unix domain socket connections only
#local   all             all                                     peer
local   all             all                                     md5
# IPv4 local connections:
host    all             all             192.168.100.0/24            trust
host    all             all             192.168.10.0/24            trust
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5
 
die erst host-zeile scheint falsch zu sein, da fehlt die cidr-angabe.

Ob die Auth-Methode für Dich ansonsten okay sind, kann ich nicht beurteilen, ich weiß nicht, was Du erreichen willst. Wenn Du Vertrauen hast, dann trust. Wenn Passwort erzwungen werden soll, dann md5.
 
Hallo,

also ich wollte das immer nach Passwort gefragt wird, da sonst ein user XY nur eingeben postgres eingeben muss im PGadmin und dann alle Berechtigungen hat auf alle DBs Superuser ist.
 
Zuletzt bearbeitet:
ja aber über PG admin kann man sich in die DB einloggen ohne postgres pw abfrage?

muss ich evtl. die IP rausnehmen 192.168.100 ?

oder den postgres superuser - rechte entfernen ?

Code:
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
#local   all             postgres                                md5
host    all             postgres                                md5

# TYPE  DATABASE        USER            ADDRESS                 METHOD

local   micky_db        micky                                   md5


# "local" is for Unix domain socket connections only
#local   all             all                                     peer
local   all             all                                     md5
# IPv4 local connections:
host    all             all             192.168.100.0/24            trust
host    all             all             192.168.10.0/24            trust
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5

danke nochmal
 
Zuletzt bearbeitet:
super Danke, das war es.
Code:
host    all             all             192.168.100.0/24            md5
Jetzt muss man ein PW eingeben.

Kann man den User die Ansicht auf die Namen der weiteren DB verwehren also das diese erst garnicht auftauchen ?

bsp.:
Also Mitarbeiter bekommt Zugriff auf Schriftverkehr_DB kann man die anderen ausblenden das er nur seine eigene DB sieht wo er auch Rechte hat.
Vor allem sieht man über die GUI ja auch alle anderen LOGIN/GROUP ROLES - admin - postgres - usw.

Schriftverkehr_DB
Finanzen_DB - (Ausblenden)
Abteilungsleitung_DB - (Ausblenden)

Wenn es nicht geht, ist es nicht Schimm.

Danke
 
Eher nicht. Das zu verstecken ist 'Security by Obscurity'

Okay, schwache Begründung. Datenbanken und User sind in PG in globalen Tabellen gespeichert. Den Zugriff auf diese zu unterbinden würde halbwegs gehen, könnte aber andere, eher negative Folgen haben. Mein Ex-Kollege hat dies mal geschrieben: Shared Database Hosting - PostgreSQL wiki

tl;dr.

Lebe damit, wie es ist.
 
bsp.:
Also Mitarbeiter bekommt Zugriff auf Schriftverkehr_DB kann man die anderen ausblenden das er nur seine eigene DB sieht wo er auch Rechte hat.
Vor allem sieht man über die GUI ja auch alle anderen LOGIN/GROUP ROLES - admin - postgres - usw.

Welche Gui? PGAdmin? Das ist eher für Administratoren und nicht für Anwender.
Den Anwendern würde ich eine eigene GUI zur verfügung stellen, die nur das kann, was der Anwender machen soll. Da muss er dann keine anderen Datenbanken sehen.
 
bei unseren Kunden ist es so, daß das inhouse-erstellte dinge sind. Mit a bissl PHP kann man sich schnell was zusammenschießen.
 
Werbung:
danke für deine antw.

Dh es würde den über eine Webanwendung laufen ?
Wie kann man das realisieren, gibt es irgend ein howto ?
 
Zurück
Oben