- Ben yüklü
PostgreSQLüzerindeEC2makine ve şimdi kullanıcının şifresini değiştirmek istiyorumpostgres - Yaparım
$ sudo -u postgres psql psql (9.1.5) Type "help" for help. postgres=# ALTER USER postgres WITH PASSWORD 'newpasswd'; ALTER ROLE
- Sonra kabuktan çıkar ve yeni şifre ile giriş yapmaya çalışırım
$ psql -U postgres -W Password for user postgres: psql: FATAL: Peer authentication failed for user "postgres"
Benim PostgreSQLversiyonum
$ psql --version
psql (PostgreSQL) 9.1.5
contains support for command-line editing
Neyi yanlış yapıyorum?
teşekkür ederim
GÜNCELLEME
Değişiklik yaptım pg_hba.confve şimdi böyle görünüyor
# Database administrative login by Unix domain socket
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
#local all all peer
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
Sonra yeniden başlattım postgres
$ sudo /etc/init.d/postgresql restart
* Restarting PostgreSQL 9.1 database server [ OK ]
Tekrar giriş yapmayı denedim, ancak başarısız oldum
$ psql -U postgres -W
Password for user postgres:
psql: FATAL: Peer authentication failed for user "postgres"
pg_hba.confParola kimlik doğrulamasını kabul etmeyecek şekilde ayarlandığını düşünüyorum .
pg_hba.conf