Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7979689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:50:32+00:00 2026-06-04T09:50:32+00:00

I would like to su to the postgres user on Mac, so that I

  • 0

I would like to su to the postgres user on 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 run postgres, I then 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 this in order to su, I also get an error:

delirium:~ anna$ sudo su - postgres
su: no directory
delirium:~ anna$

What can I do instead? I’m fairly sure that the postgres user exists.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:50:34+00:00Added an answer on June 4, 2026 at 9:50 am

    That looks consistent with the postgres user not having a login shell. Try sudo -u postgres bash

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Postgres with Kohana 3's ORM module and would like to run a
I'm using Postgres and would like to make a big update query that would
I have a many-to-many join table in Postgres that I would like to index
Would like to make anapplication in Java that will not automatically parse parameters used
I would like to temporarily impersonate a domain user account to read in a
I have a table that I would like to be able to present ranked
I have an application that allows users to save events. I would like to
I am new to the XML. Having a database in postgres, I would like
I would like to confirm that the following analysis is correct: I am building
I would like to print NumPy tabular array data, so that it looks nice.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.