0

Problem: to access an account in MacOS with the su-command, more here. I can access my other accounts, but not the one created according to the intructions. The command does not change the user:

su postgres

Question: Why can I not access an account with the su-command?

1 Answers1

7

Do you get any sort of error? It could be that the account has an invalid shell (like /usr/bin/false) in which case it would switch to that user and immediately exit.

Try:

sudo -u postgres -H bash

Which will tell it to switch to the postgres user, set the HOME environment variable appropriately, and execute the bash shell

Adam Batkin
  • 387
  • 4
  • 12