Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hL7Ay-0003AT-1B for pgsql-general@arkaria.postgresql.org; Mon, 29 Apr 2019 14:22:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hL7Aw-0007OU-EM for pgsql-general@arkaria.postgresql.org; Mon, 29 Apr 2019 14:22:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hL7Aw-0007Jh-1O for pgsql-general@lists.postgresql.org; Mon, 29 Apr 2019 14:22:34 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hL7At-000387-78 for pgsql-general@lists.postgresql.org; Mon, 29 Apr 2019 14:22:32 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 886AB5F79F; Mon, 29 Apr 2019 10:22:30 -0400 (EDT) Date: Mon, 29 Apr 2019 10:22:30 -0400 From: Stephen Frost To: Jean-Philippe Chenel Cc: "pgsql-general@lists.postgresql.org" Subject: Re: 9.6.9 Default configuration for a default installation but different with-krb-srvnam Message-ID: <20190429142230.GZ6197@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tE7+a98vGvr3lae2" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --tE7+a98vGvr3lae2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings, * Jean-Philippe Chenel (jp.chenel@LIVE.CA) wrote: > I've configured the GSSAPI authentication with MS Active Directory and it works very well. Glad to hear that. > The problem is that we have a dev and prod environment and each server must be configured with gssapi again the domain controller. The default user is "postgres" and it cannot be bound to both postgresql server at the same time to the same userPrincipalName on the Windows domain controller. You should be able to just use a different user in AD for each server, and then map 'postgres/dev.hostname@REALM' to the dev user and 'postgres/prod.hostname@REALM' to the prod user in AD and everything should work just fine. > 1. So my question is, how can I compile this version of postgresql (9.6.9) and have the same real things of the default previously installed version, but with the --with-krb-srvnam=POSTGRES_DEV to change the default user name? So one server will have the postgres user and the other one will have postgres_dev user. You shouldn't need to compile with a different krb srvname (and I wouldn't recommend that you do). If you *really* want to have a different srvname, you don't have to recompile anything if you update your client and server side configs to match whatever you want the srvname to be, but, again, you shouldn't need to do that and doing so is just confusing (particularly building different binaries, since then some binaries will think 'postgres' is the default srvname and some will think 'whatever' is, while otherwise being the same...). > 3. Maybe can we configure things differently, if something else can be done to make this work, I'm open to suggestions. Create different users in AD for each and then map to them. You don't need to have a different srvname. Thanks, Stephen --tE7+a98vGvr3lae2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJcxwimAAoJEO1sijiDR2RVNRwP/RBP6FteOIKvQ3nkaKaMTfJA ucyx6Bf/vY+JaiW/F6k+NYJrA9BNLPOJIyYbeh/KMb3uJkXwjVTnjrZDZHGTE2Vn zrc3eE50dym+ojnAJqzmZcevJW49D5XEdo2C7dJQPQ9vxCqB98ypzcFOuvsx+2eT NzgnSM8/k9PITjR1F32UsUdlKK1a0S/OL6zWA8GjyuRCI0aSNDNRbtEqcWdUwayE nHJEprITKcq5XwBZ3Yk5K5YW7REr1VxWEgAzoSpWch49DkRbj6xB8CLtHPSszyuA HNdZKErLuUs657CscYzYOYGukztXG6ezUFWViZ2ExN0KB/D2/YAsc4zdAu4NPSX0 +9UIiOD9sTxq4wh2f4Tgd2m6DMKwXylvMD75KFcVlNgMj+5NO/Aom/j+S72wmtvb h439OEgYel1XGji/+E2shnSKVG2Qo16GuZCrN9FE+OhNrYyGydIWFAiac3hVQUTy 6+jwgOYCF3iCzfT94000E0syzufo8El1C3aM6kGBxo8N+WktDXbD1fKnnPH4uqVE CqzoVmUz0F7Cdv9LcwFqB6PSyhT3qn4qKO/tj6qEpDpN5Y4c5cyQcvEfo5GtVmyu xeSLbjZbnAkbovjGTOQm6vEAlKgeweGRZ+XSyLz0WIuyz1gwUkBTsQKCNSq+nqhB /VNCgqzcMuMluHE6Uwgs =r6sz -----END PGP SIGNATURE----- --tE7+a98vGvr3lae2--