Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 520331997F5A for ; Tue, 12 Jun 2012 05:11:50 -0300 (ADT) Received: from mail-pz0-f46.google.com ([209.85.210.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SeMCY-0002Op-Pt for pgsql-admin@postgresql.org; Tue, 12 Jun 2012 08:11:49 +0000 Received: by dady13 with SMTP id y13so6534719dad.19 for ; Tue, 12 Jun 2012 01:11:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:x-gm-message-state; bh=74yD3/tfKm5Sw5z1IC5+lP7bba4Qki+ITaMidB8mw+I=; b=pGV3brS4U4myQwdiynyTaNMxerDHIsi1oa/S4DenGsLBkMWqkQiVtiQK4yyP4grGnJ l6SQK3OC5W3MK73syYsI1vjVwDS0VWumxa8PsfWxJuQ+gpGvfEo5ap+Cxzqd2gWlkNsJ lLM8TYx6Ej2luWg1Yl6MgPuBX1l900hXfvJWHXV6wsRGr6oilr3sHRgzT0MzL1HOsGnN CDnu+FLHjXK7EYkBznZcEkNpx6NryE7sKmFlS2KEU93rwSVBjQnbHsfLLlSZOTlPONYN 5MpYRh/M3/mR7GSz+7r1KEJ6XeMpfF1tG0xSaRnL1hey2ya0zMy6wftaKvSzhAEN6nkp A5Kg== Received: by 10.68.222.38 with SMTP id qj6mr35595210pbc.6.1339488692324; Tue, 12 Jun 2012 01:11:32 -0700 (PDT) Received: from ayaki.localdomain ([124.150.37.180]) by mx.google.com with ESMTPS id in5sm971741pbc.36.2012.06.12.01.11.29 (version=SSLv3 cipher=OTHER); Tue, 12 Jun 2012 01:11:30 -0700 (PDT) Message-ID: <4FD6F9AE.9000203@ringerc.id.au> Date: Tue, 12 Jun 2012 16:11:26 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Peter Cheung CC: "'pgsql-admin@postgresql.org'" Subject: Re: How to setup PostgreSQL using Windows Authentication? References: <583566AE01BD5948A12C964BD739A9A24686BA6A@HARRY.sfcu.intr> In-Reply-To: <583566AE01BD5948A12C964BD739A9A24686BA6A@HARRY.sfcu.intr> Content-Type: multipart/alternative; boundary="------------050405010807050704010503" X-Gm-Message-State: ALoCoQlUL0gvYBuAJFKY9qKzIt8/2HHDOygRfAgv5qUyfLm8bR8MsTr+infl/Wy8FsuQDfv99+U1 X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/58 X-Sequence-Number: 39649 This is a multi-part message in MIME format. --------------050405010807050704010503 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 06/12/2012 10:00 AM, Peter Cheung wrote: > > Hi, > > I'm new to PostgreSQL. I installed PostgreSQL on a Windows Server > 2008 R2 server. I have created a database and an user in Windows > Active Directory. How can I configure that user to access that database? > By default, Windows users and PostgreSQL users are completely separate. Use PgAdmin-III to create the user, or a "CREATE USER" command in psql. See http://www.postgresql.org/docs/9.1/static/user-manag.html It is also possible to use SSPI authentication with PostgreSQL, so PostgreSQL authenticates users against Active Directory. I haven't used it myself. The user must still be created in PostgreSQL, SSPI just takes care of authenticating them using their Windows credentials. See: http://www.postgresql.org/docs/9.1/static/auth-methods.html -- Craig Ringer --------------050405010807050704010503 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 06/12/2012 10:00 AM, Peter Cheung wrote:

Hi,

 

I’m new to PostgreSQL.   I installed PostgreSQL on a Windows Server 2008 R2 server.   I have created a database and an user in Windows Active Directory.  How can I configure that user to access that database?

By default, Windows users and PostgreSQL users are completely separate.

Use PgAdmin-III to create the user, or a "CREATE USER" command in psql. See

http://www.postgresql.org/docs/9.1/static/user-manag.html

It is also possible to use SSPI authentication with PostgreSQL, so PostgreSQL authenticates users against Active Directory. I haven't used it myself. The user must still be created in PostgreSQL, SSPI just takes care of authenticating them using their Windows credentials. See:

http://www.postgresql.org/docs/9.1/static/auth-methods.html

--
Craig Ringer
--------------050405010807050704010503--