pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
initdb
4+ messages / 2 participants
[nested] [flat]

* initdb
@ 2009-01-09 21:04  dx k9 <bitsandbytes88@hotmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: dx k9 @ 2009-01-09 21:04 UTC (permalink / raw)
  To: pgsql-admin


Hi,

I recently initdb'd with pwfile to create a new instance.  The command is below.
I use pam in my hba files as my METHOD to allow ldap users in, but I normally don't initialize with --pwfile(wish I wouldn't have).  Using --pwfile seems to have disabled my ability to use LDAP.  I also noticed the postgres user shows a MD5 hash in it's properties, which indicates to me it's also using LDAP.   I don't remember -W having this affect.   Also, when I add ldap users(new to the instance),  I  add a new login via pgadmin with out a password.  That normally works fine, but not now.    Is it a bug that initializing the db with --pwfile cause pam not to allow ldap communications or is that by design.  Is there someway I can turn it on or get out of this mess with out re-initializing the db with out the --pwfile option?  The only thing I can think of is to specifically use ldap in the hba file instead of pam and see if that works.  I can get my new users to work by just adding the password, but then I'm not using LDAP, which is what I want.
 
As the postgres user on the local server.
/usr/local/pgsql.v835/bin/initdb --pwfile=/home/postgres/pgp -D /data/Linux.pgsql/serray5432 -E UTF8

Thanks for any insight,
~DjK




_________________________________________________________________
Windows Live™: Keep your life in sync. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_012009=

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* initdb
@ 2009-01-14 00:08  dx k9 <bitsandbytes88@hotmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: dx k9 @ 2009-01-14 00:08 UTC (permalink / raw)
  To: pgsql-admin


Hi,
 
What option can I use with initdb to use PAM for the postgres user as the authentication type, regarding version 8.35?  If I use -W during the initialization, I end up with a md5 hash in the postgres login account, but I want it using PAM.  How can I get rid of the MD5 hash once it's there to force it to use PAM ?  Or is something different about how 8.35 initializes as compared to 8.14 or even 8.24?  Really my postgres user is LDAP, but I didn't configure with LDAP I configured with PAM.
 
What is the default password of the postgres user if I don't specify the -W with the initialization?
 
Thanks for any help,
~DjK
_________________________________________________________________
Windows Live™: Keep your life in sync. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_012009=

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* initdb
@ 2009-01-14 00:38  dx k9 <bitsandbytes88@hotmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: dx k9 @ 2009-01-14 00:38 UTC (permalink / raw)
  To: pgsql-admin


I just tried initdb with the -A pam option and no -W.  As expected, I can't log into the instance.  There is  a MD5 hash and postgres still defaults to password authentication even though I did not use the -W.  Is this a bug?    And I can't log into it because I have no idea what password it used.  Even if I did, it's not set up how I want it to be.  I want to log in with PAM.  

In our company, behind the scenes pam uses openldap.  It works fine adding a user with out a password still works fine.  It's the postgres user that I'm concerned with.  The way it is now if we change the postgres password in openldap we'd be at a loss connecting since it's using MD5.

One thing I was thinking of is using a different username for the super user like -U Tom for the initdb.  Then, just adding the user postgres later via my method I know works.  We add the user, just not specifiying a password.  When we log in with that user the defaul goes to ldap and we can easily log in.  

Maybe things have changed with version 8.3x and there is something else I should do to specifically configure ldap instead of pam.  I did notice ldap in the pg_hba as an alternative method and don't remember that as a specific method before, just pam.

Thanks,
~DjK



_________________________________________________________________
Windows Live™ Hotmail®: Chat. Store. Share. Do more with mail. 
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_howitworks_012009=

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: initdb
@ 2009-01-14 00:47  Tom Lane <tgl@sss.pgh.pa.us>
  parent: dx k9 <bitsandbytes88@hotmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2009-01-14 00:47 UTC (permalink / raw)
  To: dx k9 <bitsandbytes88@hotmail.com>; +Cc: pgsql-admin

dx k9 <bitsandbytes88@hotmail.com> writes:
> I just tried initdb with the -A pam option and no -W.  As expected, I
> can't log into the instance.  There is  a MD5 hash and postgres still
> defaults to password authentication even though I did not use the -W.
> Is this a bug?

No.  initdb is not intended to set up any possible authorization
configuration for you; it only handles two or three common cases.
Feel free to adjust the configuration files afterward.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2009-01-14 00:47 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-01-09 21:04 initdb dx k9 <bitsandbytes88@hotmail.com>
2009-01-14 00:08 initdb dx k9 <bitsandbytes88@hotmail.com>
2009-01-14 00:38 initdb dx k9 <bitsandbytes88@hotmail.com>
2009-01-14 00:47 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox