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

  • SEARCH
  • Home
  • 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 7895753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:43:11+00:00 2026-06-03T07:43:11+00:00

I just installed postgresql on my mac (lion) using homebrew, and when I use

  • 0

I just installed postgresql on my mac (lion) using homebrew, and when I use the psql postgres (or any other database), it automatically logs me in.

Funny thing is, even if change the password once in psql using the \password command, it still just lets me in without prompting me for a password.

It also shows my user name (same user name as my mac os login) as the owner.

Is there a way to secure things a bit more?

  • 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-03T07:43:12+00:00Added an answer on June 3, 2026 at 7:43 am

    Postgresql is most likely configured to trust anyone. This is configured int the file pg_hba.conf which is located in the data directory of postgresql. I do not know where homebrew places the data dir. However if you issue the following command in a terminal:

    ps aux | grep postmaster
    

    you will get a response like:

    postgres          63   0,0  0,1  2472288   4888   ??  Ss   12:19pm   0:00.85 /Library/PostgreSQL/9.0/bin/postmaster -D/Library/PostgreSQL/9.0/data
    

    The part after -D is the location of your data directory. You might have to resize your terminal to make it fit.

    Open the pg_hba.conf with your favorite editor like:

    sudo vi <datadir>/pg_hba.conf
    

    The file contains (on all installations I have seen) a fair bit of comment describing the settings. The actual settings are a the bottom of the file. I suspect that one or more of those lines end in trust. Change these into md5 to get password verification.

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

Sidebar

Related Questions

I have just installed PostgreSQL 8.3.4 on Mac OS X 10.5 (using ports), but
I've just installed PgAdmin 8.4 on an OSX Lion 10.7.3 pc with Postgres 9.1
I just installed PostgreSQL 8.4.7 with EnterpriseDB's one-click installer on Mac OS 10.6.6. I
I have just read Mac OSX Lion includes Postgresql ( Repairing Postgresql after upgrading
I've just installed PostgreSQL 9.x on my mac and when trying to run bundle
I've just installed ArcGIS Server Enterprise Advanced with ArcSDE and PostgreSQL, on a virtual
I just installed Java 7 plus JavaFX 2.1 from Oracle on my iMac (Lion).
I have installed PostgreSQL to my Mac OS X (10.6), specifically the EnterpriseDB .
I'm using Windows XP and I've installed PostgreSQL 8.3.5-2. I can create databases via
I just installed PostgreSQL-8.4 on Ubuntu. How do I start it / its GUI,

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.