Leonardo...
fiz o q vc falou... e mesmo assim naw consegui logar no phppgadim com nenhum usuario...
criei o usuario newuser da seguinte forma:
su postgres
createuser newuser
exit
su - newuser
[EMAIL PROTECTED]:~$ psql -W template1
template1=# \q
exit
su postgres
[EMAIL PROTECTED]: psql template1
template1=# alter user newuser password 'newuser';
ALTER USER
template1=# \q
exit
/etc/init.d/postgresql restart
createdb -h localhost -U newuser -W newuser
psql -h localhost -U newuser -W newuser
e deixei o arquivo /etc/postgresql/pg_hba.conf da seguinte maneira:
local all postgres ident sameuser
local newuser newuser
md5
#
# All other connections by UNIX sockets
local all all ident sameuser
#
# All IPv4 connections from localhost
#host all all 127.0.0.1 255.255.255.255 ident sameuser
host all all 127.0.0.1 255.255.255.255 md5
#
# All IPv6 localhost connections
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ident sameuser
host all all ::ffff:127.0.0.1/128 ident sameuser
#
# reject all other connection attempts
host all all 0.0.0.0 0.0.0.0 reject
#
#
#
host newuser newuser 200.13.21.22 255.255.255.255 md5
e o /etc/phppgadmin/config.inc.php desse jeito:
$conf['servers'][0]['desc'] = 'PostgreSQL';
$conf['servers'][0]['host'] = '';
$conf['servers'][0]['port'] = 5432;
$conf['servers'][0]['defaultdb'] = 'template1';
$conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump';
$conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';
$conf['default_lang'] = 'english';
$conf['extra_login_security'] = false;
$conf['owned_only'] = true;
$conf['show_comments'] = true;
$conf['show_advanced'] = false;
$conf['show_system'] = false;
$conf['show_reports'] = true;
$conf['owned_reports_only'] = true;
$conf['min_password_length'] = 1;
$conf['left_width'] = 200;
$conf['theme'] = 'default';
$conf['show_oids'] = false;
$conf['max_rows'] = 30;
$conf['max_chars'] = 50;
$conf['use_xhtml'] = false;
$conf['version'] = 13;
tipow... naw tow conseguindo logar com nenhum usuário... serah q tem como alguem me dar uma ajuda? tow precisando mesmo!!!
#
# All other connections by UNIX sockets
local all all ident sameuser
#
# All IPv4 connections from localhost
#host all all 127.0.0.1 255.255.255.255 ident sameuser
host all all 127.0.0.1 255.255.255.255 md5
#
# All IPv6 localhost connections
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ident sameuser
host all all ::ffff:127.0.0.1/128 ident sameuser
#
# reject all other connection attempts
host all all 0.0.0.0 0.0.0.0 reject
#
#
#
host newuser newuser 200.13.21.22 255.255.255.255 md5
e o /etc/phppgadmin/config.inc.php desse jeito:
$conf['servers'][0]['desc'] = 'PostgreSQL';
$conf['servers'][0]['host'] = '';
$conf['servers'][0]['port'] = 5432;
$conf['servers'][0]['defaultdb'] = 'template1';
$conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump';
$conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';
$conf['default_lang'] = 'english';
$conf['extra_login_security'] = false;
$conf['owned_only'] = true;
$conf['show_comments'] = true;
$conf['show_advanced'] = false;
$conf['show_system'] = false;
$conf['show_reports'] = true;
$conf['owned_reports_only'] = true;
$conf['min_password_length'] = 1;
$conf['left_width'] = 200;
$conf['theme'] = 'default';
$conf['show_oids'] = false;
$conf['max_rows'] = 30;
$conf['max_chars'] = 50;
$conf['use_xhtml'] = false;
$conf['version'] = 13;
tipow... naw tow conseguindo logar com nenhum usuário... serah q tem como alguem me dar uma ajuda? tow precisando mesmo!!!
Em 22/03/06, Leonardo Caldas <[EMAIL PROTECTED]> escreveu:
* Em 21 de Mar de 2006, às 22:21, elderjmp <[EMAIL PROTECTED]> escreveu:
> Pessoal...
>
> Eu naw estou conseguindo logar no phppgadmin... como eu crio um usuario com
> permissao total sobre o postgresql (podendo inclusive acessa-lo de qualquer
> lugar)?
talvez o problema não esteja no pg_hba.conf, elder. se você já tem um
usuário postgres (e creio que ele é criado por padrão quando da instalação
do postgres), você já pode logar com ele. aqui tive dificuldade pra logar,
pq uso postgres sem senha (sei que é uma falha, mas como só faço acesso
localhost, preferi deixar assim mesmo), e o arquivo config.inc.php do
phppgadmin vem com este parâmetro setado, que impede o login:
// If extra login security is true, then logins via phpPgAdmin with no
// password or certain usernames (pgsql, postgres, root, administrator)
// will be denied. Only set this false once you have read the FAQ and
// understand how to change PostgreSQL's pg_hba.conf to enable
// passworded local connections.
$conf['extra_login_security'] = true;
coloquei como "false", e consegui logar usando o usuário "postgres".
evidentemente, você pode deixar como está, e habilitar uma senha para o
usuário que for fazer o acesso local.
espero haver ajudado.
Atenciosamente,
Leonardo Caldas
--
Leonardo Caldas | Windows had detected you do not have a
ICQ #801133 | keyboard. Press 'F9" to continue.
Linux User #194205 |
JID [EMAIL PROTECTED] |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFEIYeyUpyZunY7+8MRAsRGAJ9Gh1JYQEDck7nqLWsh4v9MSJp/qgCeIvT7
m6E4MEtfQ6gLx6GUEYd98yo=
=g7s8
-----END PGP SIGNATURE-----
--
Élder José Marcelino de Paula - "Bisturi"
ICQ - 304799257
GoogleTalk - [EMAIL PROTECTED]
MSN - [EMAIL PROTECTED]
"A preguiça é a mãe de todos os vícios, e uma mãe é uma mãe e é preciso respeitá-la"