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.
Asked
Active
Viewed 6,704 times
1 Answers
14
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).

Kromey
- 1,202
- 1
- 10
- 13
-
Thanks man, worked like a charm. So is the 'postgres' user just a regular system user set to the root user for postgresql? thanks again – thesteve Apr 01 '11 at 18:38
-
The 'postgres' user is indeed a regular system user which runs the postgresql daemon. By default, Postgres uses the system for access control, with the 'postgres' user itself being effectively root for the database server. So, yes, when you log into your computer as 'postgres' (or su), you can then connect directly to the database server with full root-level access. – Kromey Apr 01 '11 at 18:59
-
Thanks again, I am still learning and having it all explained simply like that is a huge help. – thesteve Apr 01 '11 at 19:07