Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PostgreSQL postgres user password

Status
Not open for further replies.

postwick

Programmer
Jul 23, 2002
43
US
I've always done "su postgres" when logged in as root, so I never get asked for a password. Today I did it as a different user, so it asked me for a password. I tried all my usual passwords and nothing worked. I looked in pg_shadow and the passwd column is blank for the postgres user - does that mean the password is blank or does it "hide" the postgres user's password?

If it is truly blank - this is an obvious major security hole. If I change the password will it foul anything up or cause PostgreSQL not to run properly?

-- Paul
 
Hi postwick,

Postgres maintain its own security system complete with postgres username/password. This is separate from the Linux user/password system. You should log in as postgres or "su to postgres" and then set up a new user/password. You can look at the postgres doc to see the exact syntax and parameters that can be used.

I use two programs that provide database administration of a postgres database server. On my windows box I use pgadmin II. On the Linux box itself I use phpPgAdmin. Both of these tools make setting up a new user easy.

You should also edit the /var/lib/pgsql/data/pg_hba.conf file to setup your security setting. It is a text file and has a lot of example that can be commented out and used.


Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top