Jay <jspothar@cs.uccs.edu> writes:
> i tried the following command but nothing seems to work
> psql -U root -d root
> psql: FATAL: IDENT authentication failed for user "root"
You basically cannot use the -U switch when using IDENT authorization;
that auth mode requires that your presented Postgres username be the
same as the Unix name you're logged in under. (If you don't like
this then change to a different auth mode; see pg_hba.conf.)
In any case, root is unlikely to be the name of the postgres superuser.
When you probably want to do is "su" to become postgres and then psql
without using -U.
regards, tom lane