I'm using Mac 10.9.5 and PostgreSQL 9.3.4. I'm following instructions for installing a third-party software package (Instructure Canvas) on my local machine) and the instructions say to execute:
sudo -u postgres createuser $USER
sudo -u postgres psql -c "alter user $USER with superuser" postgres
but upon executing the first command, I get the error
davea$ sudo -u postgres createuser $USER
sudo: unknown user: postgres
Other posts seemed to indicate I needed to prepend a "_" to my "postgres" user, but upon doing so, i get this error ...
davea$ sudo -u _postgres createuser $USER
createuser: could not connect to database postgres: FATAL: role "_postgres" does not exist
Any ideas what I need to do to get this to work properly?