Replacing Postgres User
It might sound a silly question,


I think you have a security requirement written by someone who doesn't know what he is doing, and then implemented by someone else who doesn't know what he is doing.  "Silly" is far too benign a word to describe this.  I hope this is a toy system completely firewalled off from the internet.


sudo su - abc -c "psql"



You said you created a database user named "abc", but now you are trying to do something as the operating system user named "abc", which probably does not exist, since you didn't describe creating it.

Try psql -U abc.  It will probably get farther than your last effort, but still not work due to pg_hba.conf settings.  Once you see the error message produced (look in the server log file for postgresql for the complete error message, the one returned to the client is intentionally vague to avoid leaking sensitive information to a presumed attacker), then you can decide what to do about it.