$ psql postgres postgres=# CREATE USER someuser WITH PASSWORD 'password goes here'; CREATE USER postgres=# CREATE DATABASE newDatabase WITH OWNER = someuser; CREATE DATABASE
A quick, random password can be created using /dev/random:
$ head -c 10 /dev/random | uuencode -m -