August 14th, 2012, 07:48 AM
Join Date: Aug 2012
Time spent in forums: 34 m 21 sec
Reputation Power: 0
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)