[GENERAL] Configuration Question

2009-08-18 Thread Terry Lee Tucker
Greetings:

Is there a way to get hold of an environment variable such that it can be 
referenced in postgresql.conf? In particular, I'd like to be able to point 
dynamic_library_path to an environment variable defined at the system level 
as in dynamic_library_path = '$SOURCE:$libdir'.

master=# select version();
version

 PostgreSQL 8.3.3 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 
20070626 (Red Hat 4.1.2-14)

TIA
-- 

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Configuration Question

2009-08-18 Thread Martin Gainty

v8.3 FAQ_Solaris

To point it to the right location, set the
LD_LIBRARY_PATH environment variable, e.g.,

LD_LIBRARY_PATH=/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib
export LD_LIBRARY_PATH

and restart configure.  You will also have to keep this setting whenever
you run any of the installed PostgreSQL programs.   Alternatively, set
the environment variable LD_RUN_PATH.  See the ld(1) man page for more
information.

either LD_LIBRARY_PATH or LD_RUN_PATH should contain binary folder 
Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




 From: te...@chosen-ones.org
 To: pgsql-general@postgresql.org
 Subject: [GENERAL] Configuration Question
 Date: Tue, 18 Aug 2009 06:32:25 -0400
 
 Greetings:
 
 Is there a way to get hold of an environment variable such that it can be 
 referenced in postgresql.conf? In particular, I'd like to be able to point 
 dynamic_library_path to an environment variable defined at the system level 
 as in dynamic_library_path = '$SOURCE:$libdir'.
 
 master=# select version();
 version
 
  PostgreSQL 8.3.3 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 
 20070626 (Red Hat 4.1.2-14)
 
 TIA
 -- 
 
 -- 
 Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
 To make changes to your subscription:
 http://www.postgresql.org/mailpref/pgsql-general

_
Windows Live: Keep your friends up to date with what you do online.
http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009

Re: [GENERAL] Configuration Question

2009-08-18 Thread Terry Lee Tucker
On Tuesday 18 August 2009 09:28, Martin Gainty wrote:
 v8.3 FAQ_Solaris

 To point it to the right location, set the
 LD_LIBRARY_PATH environment variable, e.g.,

 LD_LIBRARY_PATH=/usr/sfw/lib:/opt/sfw/lib:/usr/local/lib
 export LD_LIBRARY_PATH

 and restart configure.  You will also have to keep this setting whenever
 you run any of the installed PostgreSQL programs.   Alternatively, set
 the environment variable LD_RUN_PATH.  See the ld(1) man page for more
 information.

 either LD_LIBRARY_PATH or LD_RUN_PATH should contain binary folder
 Martin Gainty


OK. Thanks for the help. I'll give this a try.

  From: te...@chosen-ones.org
  To: pgsql-general@postgresql.org
  Subject: [GENERAL] Configuration Question
  Date: Tue, 18 Aug 2009 06:32:25 -0400
 
  Greetings:
 
  Is there a way to get hold of an environment variable such that it can be
  referenced in postgresql.conf? In particular, I'd like to be able to
  point dynamic_library_path to an environment variable defined at the
  system level as in dynamic_library_path = '$SOURCE:$libdir'.
 
  master=# select version();
  version
  -
 --- PostgreSQL 8.3.3 on i686-redhat-linux-gnu,
  compiled by GCC gcc (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14)
 
  TIA
  --
 
  --
  Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
  To make changes to your subscription:
  http://www.postgresql.org/mailpref/pgsql-general

 _
 Windows Live: Keep your friends up to date with what you do online.
 http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:O
N:WL:en-US:SI_SB_online:082009

-- 

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Configuration Question

2009-08-18 Thread Tom Lane
Terry Lee Tucker te...@chosen-ones.org writes:
 Is there a way to get hold of an environment variable such that it can be 
 referenced in postgresql.conf?

No, but you could perhaps set that GUC on the postmaster command line
instead.

postmaster ... --dynamic_library_path=$SOURCE:$$libdir

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] configuration question

2007-09-23 Thread yanot panara
Hi,
Im trying to setup my postgresql database for user authentication.

I have managed to install the libnss-pgsql module with the help of the
following links below.
http://archives.postgresql.org/pgsql-general/2001-12/msg00760.php
http://archives.postgresql.org/pgsql-general/2001-12/msg00761.php

Im following the configuration steps from the link below (i had to translate
it though)
http://www.claudineimatos.com/200703/autenticacao-centralizada-com-postgres-nss-e-pam/

my database shema can be found here - http://rafb.net/p/3CcM8G49.html

/etc/nss-pgsql.conf
connectionstring = hostaddr=localhost dbname=db user=db_nss password=xxx
connect_timeout=1
getgroupmembersbyid = SELECT user_name FROM users WHERE gid = $1
getpwnam = SELECT user_name, passwd, 'desc' AS gecos, homedir, shell, uid,
gid FROM users WHERE user_name=$1
getpwuid = SELECT user_name, passwd, 'desc' AS gecos, homedir, shell, uid,
gid FROM users WHERE uid=$1
allusers = SELECT user_name, passwd, 'desc' AS gecos, homedir, shell, uid,
gid FROM users
getgrnam = SELECT group_name, passwd, gid FROM groups WHERE group_name=$1
getgrid = SELECT group_name, passwd, gid FROM groups WHERE gid=$1
allgroups = SELECT group_name, passwd, gid FROM groups
groups_dyn = SELECT g.gid FROM users JOIN groups g USING (uid) where
user_name = $1 and g.gid $2
getgroupmembersbygid = SELECT user_name FROM users JOIN user_groups g USING
(uid) where g.id = $1

CREATE VIEW shadow AS (
SELECT user_name,
s.passwd,
DATE_PART('DAYS', lastchange-'2007-01-01') AS lastchange,
min,
max,
warn,
inact,
DATE_PART('DAYS', expire-'2007-01-01') AS expire
FROM
passwrd AS s
JOIN
users USING(uid)
);

/etc/nss-pgsql-root.conf
shadowconnectionstring = hostaddr=127.0.0.1 dbname=db user=db
connect_timeout=1
shadowbyname = SELECT user_name, passwd, lastchange, min, max, warn, inact,
expire, '0' FROM shadow WHERE login = $1
shadow = SELECT user_name, passwd, lastchange, min, max, warn, inact,
expire, '0' FROM shadow

edited /etc/nsswitch.conf and added the lines
passwd: files pgsql
shadow: files pgsql
group:  files pgsql

after those changes, its said that i should test it using the command #id
myers but it returned id: myers: No such user
where did i go wrong?

steps i did can be found here - http://rafb.net/p/BdSYXr74.html

thanks in advance,
kris