This question has been flagged
2 Replies
7369 Views

Hello,

I am using OpenErp version 7 on Ubuntu 12.04 LTS. I have created a company, named "mycompany", and I should connect myself as admin with password admin on localhost. Now the thing is, when I connect with admin and admin, it says: invalid username or password.

I checked in sudo kate /etc/postgresql/9.1/main/pg_hba.conf, I see inside only postgres user (postgres) I put trust around it, but it doesnt change a thing.

I tried a killall -HUP psql: I got a "no process found". Then I tried a psql -U admin mycompany: I got a FATAL Peer authentication failed for user "admin"

Could somebody help me to recover my admin password? I tried all of those I had in my memory but nothing works. It would be very nice.

Thanks and keep the good work, its a great tool!

Julie

Avatar
Discard

Well, you can try entering there by console or with PgAdmin. Users are stored on res_users table

Author

because I did try : psql -dl mycompany postgres without success. I tried with admin as well, not working either. Would be extremely nice if u could provide some command line!

Best Answer

My 2 cents: in psql command you have to provide user from your OS who owns the database you want to access. Most likely it is postgres, openerp or your user you are login into your operating system. Knowing that and issuing the commands

psql -U <OS user> -d <database>
table res_users;

from Daniele Bondi answer should give you the password of your openerp users. Which pretty much sucks considering security.

Avatar
Discard
Author

Thanks or your reply, unfortunately it doesnt work. I did as u said but i got a peer authentification error for openerp, and the same for postgres and for admin. I checked in pgadmin: it is admin admin, but on localhost it doesnt work. Now i created a second database, because i need to go forward. But i would very like to understand what is wrong in my installation. I also removed and reinstall openerp, postgresql and pgadmin, still the same.

Take a look at this

stackoverflow.com/questions/18664074/getting-error-peer-authentication-failed-for-user-postgres-when-trying-to-ge

And this for an explanation of the peer auth error

http://stackoverflow.com/questions/17443379/psql-fatal-peer-authentication-failed-for-user-dev

Best Answer

This works for me.

psql -U user -d database
table res_users; (don't forget the semicolon)

The password is the 4th column.

Avatar
Discard
Author

Thanks or your reply, unfortunately it doesnt work by me. I did as u said but i got a peer authentification error for openerp, and the same for postgres and for admin. I checked in pgadmin: it is admin admin, but on localhost it doesnt work. I also removed and reinstall openerp, postgresql and pgadmin, still the same. Now i created a second database, because i need to go forward. But i would very like to understand what is wrong in my installation.