Disable / bypass authentication in PostgreSQL
The default Linux distribution of PostgreSQL (https://www.postgresql.org/download/) creates the system user "postgres", simply by installing the package from there.
It also has the default behaviour, that this user may access the database without password.

This is set up via the config file pg_hba.conf (https://www.postgresql.org/docs/9.2/auth-pg-hba-conf.html):

# Rule Name: local access as postgres user
local   all     postgres                                ident   


So, on Linux you simply can change to this user with


  su - postgres (for root users)


or


  sudo -u postgres -i (for sudo users)


Windows has a similar command "runas" since XP/2003.

When connecting to Postgresql server via a command like

psql


the server asks the operating system for the executing user and that's it.
You won't even need to set a password. 
Because pg_hba.conf defines local superuser access for this user.

createdb test 
pgbench -i test 
pgbench test