5

I installed postgresql and geodjango on Mac OSX following this tutorial word for word. For some reason

sudo su - postgres 

does not work. I put in my sudo password, but when I type "whoami" it's still my normal user login.

I know there is postgres user after I saw the list from

dscl . -list /Users UniqueID

Any idea why this is happening? I installed PSQL 9.1.1 server version.

Thank you.

4
  • What is the output of grep postgres /etc/passwd? Commented Dec 6, 2011 at 7:03
  • 1
    What is the output of finger postgres? Commented Dec 6, 2011 at 8:48
  • The output of 'finger postgres' is Commented Dec 7, 2011 at 6:17
  • Login: postgres Name: PostgreSQL Server Directory: /var/empty Shell: /usr/bin/false Never logged in. No Mail. No Plan. Commented Dec 7, 2011 at 6:17

1 Answer 1

5

The postgres account probably has disabled login rights and/or /bin/false as the login shell.

In this case you had best invoke postgresql commands directly, eg: sudo -u postgres psql

That should work even with a disabled login shell.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.