Tranquilized
Tranquilized

Reputation: 751

PostgreSQL password authentication failure on Linux only

I encountered something weird with connecting to a PostgreSQL database from Tomcat on a Linux server. For some weird reason I cannot connect to the database eventhough if I run the same application and configuration on a Windows machine the authentication works just fine. I can also login with pgAdmin from my Windows machine.

So when I login with pgAdmin I update the password to be the same as it was before and that all off a sudden it works :-S. If I look at the MD5 hash that was generated it's exactly the same as before. Does anybody know what might be going on?

I suspect something with case sensitivity but I can't really figure out how that is possible since I use exactly the same configuration on the Linux server and on the Windows machine.

Upvotes: 1

Views: 231

Answers (1)

Tranquilized
Tranquilized

Reputation: 751

It was something really stupid. I used the wrong syntax for creating a user. I copy pasted the SQL statements from pgAdmin which contained the hashed password so when I tried logging in with the actual password the authentication failed.

The reason why it was working from my Windows machine is because I configured my internal network to be trusted so it didn't use my specified password at all. So it looked like it was only working from Windows but in fact it wasn't.

Upvotes: 1

Related Questions