postgresql – postgres的密码

前端之家收集整理的这篇文章主要介绍了postgresql – postgres的密码前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在简短版本的postgres安装它告诉我做以下
./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

现在我创建了postgres用户,但它有时会询问该用户的凭据. postgres用户是否有默认密码?为什么我甚至需要制作另一个用户

What’s the default superuser username/password for postgres after a new install?

CAUTION The answer about changing the UNIX password for “postgres” through “$sudo passwd postgres” is not preferred,and can even be DANGEROUS!

This is why: By default,the UNIX account “postgres” is locked,which means it cannot be logged in using a password. If you use “sudo passwd postgres”,the account is immediately unlocked. Worse,if you set the password to something weak,like “postgres”,then you are exposed to a great security danger. For example,there are a number of bots out there trying the username/password combo “postgres/postgres” to log into your UNIX system.

What you should do is follow Chris James‘s answer:

06000

To explain it a little bit…

猜你在找的Postgre SQL相关文章