Newsgroup: it.comp.os.linux.software
Titolo: configurare postgresql

Ho provato ad installare postgresql sulla Debian.
Una volta installato ho provato a far partire il comando psql da root ed
ecco il risultato:
Connection to database 'template1' failed.
FATAL 1:  SetUserId: user 'root' is not in 'pg_shadow'
Ho provato allora a far partire il comando initdb e mi è risultato:
./initdb: pg_encoding: command not found
initdb does not know where to find the files that make up
Postgres (the PGLIB directory).  You must identify the PGLIB
directory either with a --pglib invocation option, or by
setting the PGLIB environment variable, or by having a program
called 'postconfig' in your search path that outputs an asignment
for PGLIB.
Stessi problemi con il comando createuser:
Connection to database 'template1' failed.
FATAL 1:  SetUserId: user 'root' is not in 'pg_shadow'
createuser: database access failed.
e il comando createdb:
Connection to database 'template1' failed.
FATAL 1:  SetUserId: user 'root' is not in 'pg_shadow'
createdb: database creation failed on fede.
Come faccio a far partire questo benedetto postgres????
Grazie dell'attenzione e dell'eventuale aiuto!!!

FATAL 1:  SetUserId: user 'root' is not in 'pg_shadow'
Non usare PostgreSQL da root, usalo da utente postgres.
Da root da il comando:
# su - postgres
e solo dopo usa i comandi del postgres come psql, createuser, dropdb,
ecc.
-- 
Un Ciao in DO Maggiore!
-=) Sbaturzio (=-

 FATAL 1:  SetUserId: user 'root' is not in 'pg_shadow'
su -c "createuser root" postgres
-- 
  Giuseppe "Cowo" Corbelli \/\ My software: 
http://cowo.yoda2000.net
    **ANTI-SPAM** -- **Substitute IHATESPAM with cowo to reply by mail** 
  -<! Where's the warrior in you And the spirit he got? You say - "lost" No!
		It's somewhere inside !>- Lost Horizon - Sworn In The Metal Wind

su -c "createuser root" postgres
Mmm...in Debian non serve, l'utente e' gia' creato dall'installazione
dei pacchetti postgresql.
L'utente che viene segnalato mancante in pg_shadow e' l'utente con il
quale accedere ai database postgresql. Per aggiungere o togliere questi
utenti in pg_shadow di deve diventare lo user postgres e poi si usano i
comandi:
createuser     : crea un nuovo utente per i db postgres
dropuser       : elimina un utente di db postgres


 dropuser       : elimina un utente di db postgres
Ehm si'...
E rispetto a quello che ho scritto qual'e' la differenza?
-- 
  Giuseppe "Cowo" Corbelli \/\ My software: 
http://cowo.yoda2000.net
        **ANTI-SPAM** -- **Substitute IHATESPAM with cowo to reply by mail**
 [cowo@braveheart cowo]$ make sex
    make: *** No rule to make target 'sex'.  Stop. 

If you get the error "psql: FATAL 1: SetUserId: user '<username>' is not
in 'pg_shadow'", login as root and try the following: 
#su postgres - 
#whoami 
postgres 
#psql template1 
Welcome to psql, the PostgreSQL interactive terminal. 
Type: \copyright for distribution terms 
\h for help with SQL commands 
\? for help on internal slash commands 
\g or terminate with semicolon to execute query 
\q to quit 
template1=# create user <username>; 
CREATE USER 
template1=# update pg_shadow set usecreatedb='t' where
usename='<username>'; UPDATE 1 
template1=# select * from pg_shadow; 
now you should see your user created, and his access rights. Access rights
can be modified with the update command as I wrote above. 
Good luck:) 
č sulla documentation di 
postgres.org