重置“postgres” Ubuntu10.10 上 Postgresql 8.4 中的用户密码
我正在尝试 postgresql 教程,但无法登录“postgres”用户帐户,这似乎是执行任何操作所必需的。当我完成安装时,我以为我写下了密码,但显然没有。有没有办法重置密码或者需要重新安装?感谢您的任何建议。
I am attempting a postgresql tutorial and cannot login to the 'postgres' user account which seems to be necessary to perform any actions. When I went through the installation I thought I wrote down the password but apparently not. Is there a way for me to reset the password or do I need to reinstall? Thanks for any advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
sudo passwd postgres
会让你做到这一点。或者,
sudo su - postgres
让您无需密码即可登录 postgres 用户帐户(自然会要求您输入密码才能使用 sudo)。sudo passwd postgres
will let you do it.Alternatively,
sudo su - postgres
will let you log in to the postgres user's account without the password at all (you'll be asked for your password to use sudo, naturally).