August 14th, 2012, 07:48 AM
Ident sameuser brings wrong user for root
I configured Postgres to use ident sameuser, and tried to run psql when I'm logged-in as root,
I get an error that postgresql is trying to login as some strange user-name : my hostname with '$' at the end.
(but when i type 'whoami' I get 'root' as an answer.)
If I do psql -U root
then it's ok, but when I only do
it recongize the user wrongly.
If I log-in to linux with non-root user (i.e. postgres) then all is fine...
How does ident recognize the user-name?
How can I make him recognize the root user correctly?
The error I get for "psql postgres" is
psql: FATAL: role "S524654$" does not exist
(S524654 is my hostname)