#author("2019-07-08T03:16:54+09:00","default:ryuichi","ryuichi")
* パスワードのリセット [#i4d55a78]
** 管理者ユーザのパスワードのリセット [#ra4fb1ea]
cd /etc/postgresql/9.6/main # (1)
cp pg_hba.conf pg_hba.conf.$(date +%Y%m%d) # (2)
vi pg_hba.conf # (3)
/etc/init.d/postgresql restart # (4)
psql -U postgres # (5)
---------------------------------------------- # (6)
postgres=# ALTER USER postgres with password 'new-pass';
----------------------------------------------
cp pg_hba.conf.20190708 pg_hba.conf # (7)
/etc/init.d/postgresql restart # (8)
*** 参考 [#i7b09df0]
https://stackoverflow.com/questions/10845998/i-forgot-the-password-i-entered-during-postgres-installation