在简短版本的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@H_403_2@现在我创建了postgres用户,但它有时会询问该用户的凭据. postgres用户是否有默认密码?为什么我甚至需要制作另一个用户?
What’s the default superuser username/password for postgres after a new install?:
原文链接:https://www.f2er.com/postgresql/192743.htmlCAUTION 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…