我正在使用http://gettingstartedwithdjango.com/en/lessons/introduction-and-launch/跟随流浪者运行的virtualenv,当我输入时:
$ sudo su postgres
我被要求输入密码:
$ [sudo] password for postgres:
有没有人有关于如何找到密码的任何提示?我很困惑,我甚至收到了这个密码请求,因为之前发生了这样的事情:
createuser: creation of new role failed: ERROR: role "vagrant" already exists
postgres@precise64:/vagrant/projects/microblog$ createuser -P
could not change directory to "/vagrant/projects/microblog"
(blog-venv)vagrant@precise64:/vagrant/projects/microblog$ createdb microblog
createdb: database creation failed: ERROR: permission denied to create database
(blog-venv)vagrant@precise64:/vagrant/projects/microblog$ sudo su postgres
postgres@precise64:/vagrant/projects/microblog$ dropuser vagrant
could not change directory to "/vagrant/projects/microblog"
postgres@precise64:/vagrant/projects/microblog$sudo -u postgres psql postgres is not in the sudoers file. This incident will be reported.
postgres@precise64:/vagrant/projects/microblog/microblog$ sudo su postgres
[sudo] password for postgres:
最终我试图让createdb microblog
在Postgres中为我创建一个数据库,但我遇到了这些奇怪的密码请求问题。