I would like sufor a postgres user on a Mac so that I can run postgres.
What am I doing wrong here?
delirium:~ anna$ sudo su postgres
delirium:~ anna$
Nothing happens. If I try to start postgres, I will get something like this:
delirium:~ anna$ sudo pg_ctl -D /usr/local/var/postgres -l
/usr/local/var/postgres/server.log startpg_ctl: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.
If I try to do this so suthat I also get an error message:
delirium:~ anna$ sudo su - postgres
su: no directory
delirium:~ anna$
What can I do instead? I am sure that postgres user exists.
source
share