79299636

Date: 2024-12-21 15:24:01
Score: 1
Natty:
Report link

Linux - Red Hat 9

I carefully followed the instructions on the PostgreSQL installation page. It said to enter this:

su - postgres

I got this:

su: Authentication failure

After scratching my head a few minutes and trying other suggestions that did not work, it occurred to me that when you su, you are simply changing your Linux user. It has nothing to do with signing into a database. So... I changed the postgres user password in Linux thus:

sudo passwd postgres
New password: <enter new password here>
Retype new password: <enter new password again>

Now this works:

su - postgres
<sign in with new password>
psql

Done!

Reasons:
  • Blacklisted phrase (1): did not work
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Sam S