dbTalk Databases Forums  

Newbie Security Questions

comp.databases.postgresql comp.databases.postgresql


Discuss Newbie Security Questions in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
HoneyMonster
 
Posts: n/a

Default Newbie Security Questions - 12-07-2010 , 02:49 PM






As a refugee from the big bad O, I am looking at Postgres.
Four security questions (sorry if they have been asked and answered
before):

Can I remove postgres (the user) from pg_hba?
Can I lock the unix postgres account; i.e. set its login shell to /sbin/
nologin?
Can I drop the postgres database?
Can I drop the schemata "public"?

If there is a FAQ, please could someone point to it.

Thanks.

Reply With Quote
  #2  
Old   
Matthew Woodcraft
 
Posts: n/a

Default Re: Newbie Security Questions - 12-07-2010 , 03:46 PM






HoneyMonster <someone (AT) someplace (DOT) invalid> wrote:
Quote:
Can I remove postgres (the user) from pg_hba?
Yes.


Quote:
Can I lock the unix postgres account; i.e. set its login shell to /sbin/
nologin?
Yes.


Quote:
Can I drop the postgres database?
Yes. It might cause trouble with command-line tools like 'createuser',
but if it does you could use SQL instead.


Quote:
Can I drop the schemata "public"?
Yes.


Quote:
If there is a FAQ, please could someone point to it.
There's a FAQ at http://wiki.postgresql.org/wiki/FAQ , though it
doesn't seem to mention any of the above.

-M-

Reply With Quote
  #3  
Old   
HoneyMonster
 
Posts: n/a

Default Re: Newbie Security Questions - 12-07-2010 , 05:45 PM



On Tue, 07 Dec 2010 21:46:59 +0000, Matthew Woodcraft wrote:

Quote:
HoneyMonster <someone (AT) someplace (DOT) invalid> wrote:
Can I remove postgres (the user) from pg_hba?

Yes.


Can I lock the unix postgres account; i.e. set its login shell to
/sbin/ nologin?

Yes.


Can I drop the postgres database?

Yes. It might cause trouble with command-line tools like 'createuser',
but if it does you could use SQL instead.


Can I drop the schemata "public"?

Yes.


If there is a FAQ, please could someone point to it.

There's a FAQ at http://wiki.postgresql.org/wiki/FAQ , though it doesn't
seem to mention any of the above.

Thanks, Matthew.

Reply With Quote
  #4  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Newbie Security Questions - 12-09-2010 , 10:08 PM



On Tue, 07 Dec 2010 20:49:26 +0000, HoneyMonster wrote:

Quote:
Can I lock the unix postgres account; i.e. set its login shell to /sbin/
nologin?
My advice would be to set the password to '****', character '*' cannot
be generated by Unix hashing function. That means that the only way to
log in would be doing "su - postgres" as root. You don't really want to
close that option.



--
http://mgogala.byethost5.com

Reply With Quote
  #5  
Old   
HoneyMonster
 
Posts: n/a

Default Re: Newbie Security Questions - 12-10-2010 , 06:30 AM



On Fri, 10 Dec 2010 04:08:59 +0000, Mladen Gogala wrote:

Quote:
On Tue, 07 Dec 2010 20:49:26 +0000, HoneyMonster wrote:

Can I lock the unix postgres account; i.e. set its login shell to
/sbin/ nologin?

My advice would be to set the password to '****', character '*' cannot
be generated by Unix hashing function. That means that the only way to
log in would be doing "su - postgres" as root. You don't really want to
close that option.
Yes, thanks. I've applied the three other 'hardening' options in my small
test cluster, but I found that the postmaster wouldn't start at boot if
the postgres unix account was disabled, as the init script contains
'su' (actually 'runuser' for SELinux).

I think I'll adopt your suggestion.

Reply With Quote
  #6  
Old   
Mladen Gogala
 
Posts: n/a

Default Re: Newbie Security Questions - 02-04-2011 , 10:34 AM



On Tue, 07 Dec 2010 20:49:26 +0000, HoneyMonster wrote:

Quote:
As a refugee from the big bad O, I am looking at Postgres.
Don't do that. Postgres is not there yet. For the the porting projects,
you need optimizer hints. There is a fatwa against optimizer hints in the
Postgres community. Case closed. Postgres distrusts its users deeply and
is unwilling to provide them with the tools to control the optimizer,
available with all other major databases. You're either supposed to get a
programming guru to write a custom patch or to go with a commercial
version which, incidentally, has hints.
If you don't want to start the development from scratch, Postgres is not
an option for the Oracle users. I wasted a year until I have realized
that.



--
http://mgogala.byethost5.com

Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.