PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 31st, 2002, 05:00 PM
cliffyman cliffyman is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Washington DC, USA
Posts: 156 cliffyman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 7 sec
Reputation Power: 8
Send a message via AIM to cliffyman
PostgreSQL Admin - passwords?

I just installed PostgreSQL 7.3.1 from source on RedHat 8.0. I have the system up, running and accessible from Unix sockets and TCP/IP. I can get into the system by doing the /usr/local/pgsql/bin/psql test command (as user postgres) or from my W2K box with pgAdmin2 (user: postgres and blank password) after I made changes to the pg_hba.conf file.

My question is, how do I make the system more secure by actually requiring real passwords?

(1) I can only get into the database from the shell by su'ing to the user postgres but it never asks for a password - is this okay?
(2) I want to make sure that when I connect via TCP/IP from my W2K box that a password is required as well.

Thanks for any security tips you guys might have.


-Cliff

Last edited by cliffyman : December 31st, 2002 at 05:04 PM.

Reply With Quote
  #2  
Old January 2nd, 2003, 06:20 AM
pmm pmm is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2002
Posts: 679 pmm User rank is Sergeant (500 - 2000 Reputation Level)pmm User rank is Sergeant (500 - 2000 Reputation Level)pmm User rank is Sergeant (500 - 2000 Reputation Level)pmm User rank is Sergeant (500 - 2000 Reputation Level)pmm User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 3 h 38 m 45 sec
Reputation Power: 13
Hi,

I came to this forum to post a similar question, so I will add to this thread. In reply to your first point, I can only su to postgres from root which I think is OK.
In order to get a PHP script to connect to a database, I had to set up "wwwrun" (the user that apache runs as on my system) as a user for postgres, using the "createuser" command, then grant permissions for this user.
But what worries me is, as you said, there is no password, so what is to stop anyone connecting to this database from a remote machine as the user "wwwrun"? I also couldn't define the host making the connection when granting permissions as you can in MySQL ( GRANT ..... TO user@localhost .....).
So - should I set a password for wwwrun? There must be a standard way making a connection in a secure way - could someone please point me in the right direction?
Hope this is some help to you - I found this tutorial helpful:
http://www-it.hive.no/database/pgsq...rial/intro.html

Reply With Quote
  #3  
Old January 2nd, 2003, 09:05 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 13
Send a message via AIM to rod k
Quote:
how do I make the system more secure by actually requiring real passwords
You have to edit pg_hba.conf to setup the requirements. You also set allowed hosts there, pmm.

Quote:
I can only get into the database from the shell by su'ing to the user postgres but it never asks for a password - is this okay?
No, it's not. Again, edit pg_hba.conf to require passwords. You will also need to give the postgres user a password with ALTER USER and be sure to give a password to any new users when using CREATE USER.
__________________
FSBO (For Sale By Owner) Realty

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > PostgreSQL Admin - passwords?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT