Created
March 6, 2015 17:51
-
-
Save dasgoll/577dfa86b05c3e05569a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to Change password for PostgreSQL user 'ambari' - default password is 'bigdata' | |
/etc/init.d/ambari-server stop | |
# enable password-less login for user 'postgres' | |
vi /var/lib/pgsql/data/pg_hba.conf | |
change 'local all postgres ident' to 'local all postgres trust' | |
/etc/init.d/postgresql restart | |
psql -U postgres | |
postgres=# alter user ambari with password 'NEWPASSWORD'; | |
revert changes back in '/var/lib/pgsql/data/pg_hba.conf' | |
/etc/init.d/postgresql restart | |
change password in /etc/ambari-server/conf/password.dat | |
/etc/init.d/ambari-server start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi dasgoll
I have installed postgresql-9.4 and did the following
service postgresql stop
service postgresql-9.4 initdb
service postgresql-9.4 start
sudo su - postgres
cd /var/lib/pgsql/9.4/data
vi postgresql.conf
change (uncomment):
listen_addresses = 'localhost' # what IP address(es) to listen on;
TO
listen_addresses = '*'
vi pg_hba.conf
change line to have md5:
replace with:
TYPE DATABASE USER CIDR-ADDRESS METHOD
"local" is for Unix domain socket connections only
local all all trust
IPv4 local connections:
host all all 127.0.0.1/32 trust
IPv6 local connections:
host all all ::1/128 trust
host all boss 0.0.0.0/0 md5
sudo service postgresql-9.4 restart
However I was not able to login on ambari because I didn't tell ambari to use
postgresql-9.4. Can you please advice ?
Many thanks
Dragan