From lvaningen@esncc.com Fri Sep 22 18:48:32 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 46E8E9FB4FD for ; Fri, 22 Sep 2006 15:48:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 40178-02-9 for ; Fri, 22 Sep 2006 15:48:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from twmail.ESNCC.COM (static-66-173-159-28.t1.cavtel.net [66.173.159.28]) by postgresql.org (Postfix) with SMTP id 871549FB4F1 for ; Fri, 22 Sep 2006 14:49:11 -0300 (ADT) Received: from spawar2i8uvlb9 ([150.125.117.63]) by twmail.ESNCC.COM with Microsoft SMTPSVC(6.0.3790.1830); Fri, 22 Sep 2006 13:49:06 -0400 From: "Lane Van Ingen" To: Subject: Security Concerns over User 'postgres' Date: Fri, 22 Sep 2006 14:09:23 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0125_01C6DE50.B7F95AC0" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 thread-index: AcbecjvKjkiX+JJUTUGvZGkn0yt3JA== Message-ID: X-OriginalArrivalTime: 22 Sep 2006 17:49:07.0192 (UTC) FILETIME=[66ABF780:01C6DE6F] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.186 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200609/247 X-Sequence-Number: 23161 This is a multi-part message in MIME format. ------=_NextPart_000_0125_01C6DE50.B7F95AC0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit We are running on Red Hat Enterprise Linux 4.0, using PostgreSQL 8.1.4 . We created our PostgreSQL instance by compiling it from source, and the instance is working just fine. User postgres runs the service; we do not know what the password is, and we think it got created automatically by the compile / install process. However, my user community is concerned that the password for PostgreSQL (which is MD5 encrypted) could be cracked, and would like to secure it from having access to the shell. I tried attaching /sbin/nologin to the postgres user login information, but that does not work since we use /etc/init.d/postgresql to start and stop the engine. Does anybody have any suggestions on how to properly address these concerns? Lane M. Van Ingen Charleston, SC ------=_NextPart_000_0125_01C6DE50.B7F95AC0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Security Concerns over User 'postgres'

We = are running on Red Hat Enterprise Linux 4.0, using PostgreSQL 8.1.4 = .

We = created our PostgreSQL instance by compiling it from source, and the = instance is working just fine. User postgres runs the service; we do not = know what the password is, and we think it got created automatically by = the compile / install process.

However, my user community is = concerned that the password for PostgreSQL (which is MD5 encrypted) = could be cracked, and would like to secure it = from having access to the shell. I tried attaching /sbin/nologin to the = postgres user login information, but that does not work since we use = /etc/init.d/postgresql to start and stop the engine.

Does = anybody have any suggestions on how = to properly address these concerns?

Lane M. Van = Ingen

Charleston, SC


------=_NextPart_000_0125_01C6DE50.B7F95AC0-- From tgl@sss.pgh.pa.us Fri Sep 22 19:08:34 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B537C9FB3AD for ; Fri, 22 Sep 2006 16:08:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 42366-07 for ; Fri, 22 Sep 2006 16:08:27 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 1B5FC9FB300 for ; Fri, 22 Sep 2006 16:08:26 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k8MJ8PmX009541; Fri, 22 Sep 2006 15:08:25 -0400 (EDT) To: "Lane Van Ingen" cc: pgsql-admin@postgresql.org Subject: Re: Security Concerns over User 'postgres' In-reply-to: References: Comments: In-reply-to "Lane Van Ingen" message dated "Fri, 22 Sep 2006 14:09:23 -0400" Date: Fri, 22 Sep 2006 15:08:25 -0400 Message-ID: <9540.1158952105@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.099 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/248 X-Sequence-Number: 23162 "Lane Van Ingen" writes: > We created our PostgreSQL instance by compiling it from source, and the > instance is working just fine. User postgres runs the service; we do not > know what the password is, and we think it got created automatically by the > compile / install process. Are you sure it even *has* a password? In the default RPM installation, user postgres is created without any password --- the only way to become postgres is to su there from root, and if you've got root you hardly need to crack into postgres. regards, tom lane From marcelojscosta@gmail.com Fri Sep 22 19:38:09 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 46DBE9FB410 for ; Fri, 22 Sep 2006 16:38:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 18510-09 for ; Fri, 22 Sep 2006 19:38:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by postgresql.org (Postfix) with ESMTP id 084D19FB40A for ; Fri, 22 Sep 2006 16:38:04 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id 30so284323ugc for ; Fri, 22 Sep 2006 12:38:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=JF6WlOZ42QTd47tlmbN3g3LCOVPvBgwirTzgSZV8cUCLV11U0Z4R2U1l/I6FJujyscQn6ZIUvvzkRCapDITgph8FKrXKqzJWdJez/iVz4GKucVoVnsE1cUpqvTJR6igsh9cpEuGbR5wwpPRV4bzLpbHmTfjvSW9BOo+Juzb3zUE= Received: by 10.67.101.10 with SMTP id d10mr893594ugm; Fri, 22 Sep 2006 12:38:03 -0700 (PDT) Received: by 10.66.223.9 with HTTP; Fri, 22 Sep 2006 12:38:02 -0700 (PDT) Message-ID: Date: Fri, 22 Sep 2006 16:38:02 -0300 From: "Marcelo Costa" To: "Tom Lane" Subject: Re: Security Concerns over User 'postgres' Cc: "Lane Van Ingen" , pgsql-admin@postgresql.org In-Reply-To: <9540.1158952105@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_17269_15079169.1158953882917" References: <9540.1158952105@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.574 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_30_40, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/249 X-Sequence-Number: 23163 ------=_Part_17269_15079169.1158953882917 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, Only create one user to your aplications and give to her rights to acess your database You can change the password of postgresql user In your linux distro type: su - postgres psql -U postgres in the prompt of postgres type: # alter user postgres with password 'your new password'; After this your password of user postgres are change. Create an user to your aplications and give this to all users. Don=B4t forget of rights (INSERT,SELECT,UPDATE,DELETE) on your tables to th= is user. [],s Marcelo Costa DBA Executive Secretary of Education from Par=E1/Amaz=F4nia/Brazil 2006/9/22, Tom Lane : > > "Lane Van Ingen" writes: > > We created our PostgreSQL instance by compiling it from source, and the > > instance is working just fine. User postgres runs the service; we do no= t > > know what the password is, and we think it got created automatically by > the > > compile / install process. > > Are you sure it even *has* a password? In the default RPM installation, > user postgres is created without any password --- the only way to become > postgres is to su there from root, and if you've got root you hardly > need to crack into postgres. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > --=20 Marcelo Costa ------=_Part_17269_15079169.1158953882917 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi,

Only create one user to your aplications and give to her rights= to acess your database

You can change the password of postgresql us= er

In your linux distro type:

su - postgres

psql -U po= stgres

in the prompt of postgres type:

# alter user postgres with p= assword 'your new password';

After this your password of user postgr= es are change.

Create an user to your aplications and give this to a= ll users.

Don=B4t forget of rights (INSERT,SELECT,UPDATE,DELETE) on your tabl= es to this user.

[],s

Marcelo Costa
DBA
Executive Secre= tary of Education from Par=E1/Amaz=F4nia/Brazil



2006/9/22, Tom Lane <tgl@sss.pgh.pa= .us>:
lvani= ngen@esncc.com> writes:
> We created our PostgreSQL instance b= y compiling it from source, and the
> instance is working just fine. = User postgres runs the service; we do not
> know what the password is, and we think it got created automatical= ly by the
> compile / install process.

Are you sure it even *h= as* a password?  In the default RPM installation,
user postgre= s is created without any password --- the only way to become
postgres is to su there from root, and if you've got root you hardlyneed to crack into postgres.

      &n= bsp;            = ;     regards, tom lane

-------------------= --------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

   &nb= sp;           http://www.postgresql.org/docs/faq<= br>



--
Marcelo Costa ------=_Part_17269_15079169.1158953882917-- From lvaningen@esncc.com Fri Sep 22 20:46:49 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id B09859FB3F3 for ; Fri, 22 Sep 2006 17:46:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 90376-02 for ; Fri, 22 Sep 2006 17:46:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from twmail.ESNCC.COM (static-66-173-159-28.t1.cavtel.net [66.173.159.28]) by postgresql.org (Postfix) with SMTP id 624559FB3EE for ; Fri, 22 Sep 2006 17:46:44 -0300 (ADT) Received: from spawar2i8uvlb9 ([150.125.117.63]) by twmail.ESNCC.COM with Microsoft SMTPSVC(6.0.3790.1830); Fri, 22 Sep 2006 16:46:42 -0400 From: "Lane Van Ingen" To: "'Tom Lane'" Cc: Subject: Re: Security Concerns over User 'postgres' Date: Fri, 22 Sep 2006 17:07:04 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <9540.1158952105@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 thread-index: Acbeenu9pUHch81DSYOIIXnGjwBmuwADxQGg Message-ID: X-OriginalArrivalTime: 22 Sep 2006 20:46:42.0790 (UTC) FILETIME=[35E73060:01C6DE88] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.175 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/250 X-Sequence-Number: 23164 Looked at /etc/shadow, and (in fact) it doesn't have a password, so I was wrong about that. Tried to use the login command to login directly log into postgres, but for some reason could not do that on RHEL 4.0 either. So, like you said, I am not certain that I have a vulnerability here at all, other than su-ing from root. -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Friday, September 22, 2006 3:08 PM To: Lane Van Ingen Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] Security Concerns over User 'postgres' "Lane Van Ingen" writes: > We created our PostgreSQL instance by compiling it from source, and the > instance is working just fine. User postgres runs the service; we do not > know what the password is, and we think it got created automatically by the > compile / install process. Are you sure it even *has* a password? In the default RPM installation, user postgres is created without any password --- the only way to become postgres is to su there from root, and if you've got root you hardly need to crack into postgres. regards, tom lane From cbbrowne@acm.org Fri Sep 22 23:28:03 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id C08079FB350 for ; Fri, 22 Sep 2006 20:28:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 14227-03 for ; Fri, 22 Sep 2006 23:28:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 5D2C69FB311 for ; Fri, 22 Sep 2006 20:28:01 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id k8MNRsjR075307 for ; Fri, 22 Sep 2006 20:27:54 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id k8MN3v5F070301 for pgsql-admin@postgresql.org; Fri, 22 Sep 2006 20:03:57 -0300 (ADT) (envelope-from news) From: Chris Browne X-Newsgroups: pgsql.admin Subject: Re: Security Concerns over User 'postgres' Date: Fri, 22 Sep 2006 18:46:32 -0400 Organization: cbbrowne Computing Inc Lines: 18 Message-ID: <607izvjz93.fsf@dba2.int.libertyrms.com> References: <9540.1158952105@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.19 (linux) Cancel-Lock: sha1:cvK89tuXQz7btpPcxnI0ZFwIbNg= To: pgsql-admin@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.274 tagged_above=0 required=5 tests=INFO_TLD, UNPARSEABLE_RELAY X-Spam-Level: * X-Archive-Number: 200609/253 X-Sequence-Number: 23167 lvaningen@esncc.com ("Lane Van Ingen") writes: > Looked at /etc/shadow, and (in fact) it doesn't have a password, so I was > wrong about that. > > Tried to use the login command to login directly log into postgres, but for > some reason could not do that on RHEL 4.0 either. So, like you said, I am > not certain that I have a vulnerability here at all, other than su-ing from > root. I'm certain; you do NOT have a vulnerability there, if there is no password in /etc/shadow. (Well, barring stupidity like dramatic misconfiguration of PAM to accept logins without passwords :-).) -- (format nil "~S@~S" "cbbrowne" "cbbrowne.com") http://linuxdatabases.info/info/finances.html Rules of the Evil Overlord #10. "I will not interrogate my enemies in the inner sanctum -- a small hotel well outside my borders will work just as well."