본문 바로가기
Linux

Ubuntu 20.04 로그인 문제 FATAL: password authentication failed for user "postgres"

by 케이오스 2020. 12. 8.
$sudo apt install postgresql-12

로그인 안됨

$sudo -u postgres psql #체크1  
$sudo -u postgres psql template1 #체크2

나의 경우는 3번째 경우

/etc/postgresql/12/main/pg_hba.conf

89: local all postgres ident

ident 가 아니라 peer 일 경우!!! indent 또는 trust로 바꾼 후 다시 md5로 변경

$sudo service postgresql restart
$sudo -u postgres psql

psql#ALTER USER '유저네임:postgres' PASSWORD '새비번';

89: local all postgresql md5 로 다시 변경

이제 암호문제 없이 잘 접속 됨!!!

'Linux' 카테고리의 다른 글

Nodejs로 만들어진 Web app을 리눅스에서 구동하는 방법  (0) 2020.12.22