Re: lug-bg: ip accounting & ipac-ng
- Subject: Re: lug-bg: ip accounting & ipac-ng
- From: danchev@xxxxxxxxx (George Danchev)
- Date: Tue, 15 Jan 2002 19:37:14 +0200
On Tuesday 15 January 2002 16:26, you wrote:
> Imam slednia problem.
>
> konfiguriral sam ip accounting s "ipac-ng", no ne uspiavam da go nakaram da
> pishe v baza danni. za da pusna postmaster ne triabva da sam "root". pravia
> user "postgres" i startiram postmaster, no sled tova kato startiram
> "fetchipac" toi ne razpoznava user root...smenix OWN-a na fetchipac da bade
> "postgres" i startirah kato user "postgres", no togava mi dava che ne moge
> da pishe v "lock" faila. ne znam dali ne go obiasnih malko obarkano...sry.
>
> niakoi da izpolzva ipac-ng?
az tova ipac-ng ne go polzvam i ne znam, no maj se opitvash da pravish
map-vane muzhdu "systemniq" i "PostgrSQL" username - v slu4aq postgres
username-a ..., koeto sa dve mnogo razli4ni nesta ot gledna to4ka na demona,
kojto iska da znae koj PostgreSQL username polzvash kogato se auth-vash pred
nego i kakvi prava ima toj. Ponezhe PostgreSQL ima dosta slozhna shema za
Auth (AUTHTYPE's), pro4eti "pg_hba.conf" mnogo vnimatelno, i v zavisimost
kakvo si set-nat v nego za AUTHTYPE, mozhe da imash nuzhda i ot
"pg_ident.conf" za mapping (ako iskash taka da go napravish estestveno)
kydeto se ukazvat zapisi ot vida:
#Map Ident PostgreSQL_username
wrd postgres dragan
# "wrd" e ime na map file v kojto se syhranqva
# PostgreSQL pass-a na dragan
# dragan:4R)4)#0@1
# Ident postgres - ti e systemen user, kojto pyska superdemona postmaster,
# kojto ot svoq strana kontrolira postgres demonite
# dragan ti e PostgreSQL_username.
# trqbva da my dadesh i syotvetnite prava za rabota s bazite danni
# Taka map-vash sistemniq username "postgres"
# s PostgeSQL username "dragan"
# Dori mozhe nqkolko sistemni username-a da map-vat
# edin i systi PostgreSQL username.
a v "pg_hba.conf" da imash naprimer:
host all 127.0.0.1 255.0.0.0 crypt wrd
local all crypt wrd
# vizh v pg_hba.conf-a za opisanieto na AUTHTYPEs
A ako prosto iskash sistemniq user "postgres" da se map-va kato "postgres" v
PostgreSQL, direction 1:1, togava v pg_hba.conf ukazvash "sameuser":
host dbname 192.168.91.0 255.255.255.0 ident sameuser
(sameuser e built-in map name v PostgreSQL i toj si znae 4e trebe da pravi
mapping mezhdu systemniq i negoviq potreitel, t.e. tova e edin i systi
username)
I nqkraj trebe da dadesh access na tozi PostgreSQL username (toj e vazhniq)
da pipa po bazite danni, ina4e demona ste byde mnogo strog s nego :). Razbira
se ne e zadylzhitelno da go pravish s mapping na usernames ... Nakraq prosto
proveri s terminalnata programa psql kakvo mozhe da pravi tozi PostgreSQL
username:
psql -U username -h hostname -p port -d database
ste te pita za parola, ako ne si my q ukazal s -W password.
--
Greets,
fr33zb1
===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora
|