Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1srIkH-000UGn-P2 for pgsql-admin@arkaria.postgresql.org; Thu, 19 Sep 2024 15:07:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1srIkF-002dNs-GD for pgsql-admin@arkaria.postgresql.org; Thu, 19 Sep 2024 15:07:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1srIkF-002dNk-5B for pgsql-admin@lists.postgresql.org; Thu, 19 Sep 2024 15:07:00 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1srIkE-0001XZ-58 for pgsql-admin@postgresql.org; Thu, 19 Sep 2024 15:06:59 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-277e4327c99so473601fac.0 for ; Thu, 19 Sep 2024 08:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726758417; x=1727363217; darn=postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3o08CUN8m+F2kLRqcd8GkJcn/B57fWxf+9LU8tOZgtk=; b=mn9AcLQNOC3Hie2v2RGmRwDsKY9KoKz0/r9mvBTyx8tx1F6f04k37fR3E8zhcpHqBE tkquxUt/Y8GekKB3lTvNc+XQbBqHULpk3zPIqJjSJWnaz7RkLKEBrqzimipdTrL4mCSv tVg59I84qgEfLwWfjlfGABBlHvVWsggGZXsBp2FYHfWlkQUy3J8Cc+pFzoCBJKQCl762 FMqvxyKP4kUeb5hPIhF3hv5rSk3YyQC/eYb1D76TvJm4z8GwMdhjtOHMeYmdC2XySzfc VUbqOsDnzme9CSISScMr/ml/gCzPZrn9m41ndJ3W9QitaBtf9wqQXtcAiu84S57KDEr/ pjJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726758417; x=1727363217; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3o08CUN8m+F2kLRqcd8GkJcn/B57fWxf+9LU8tOZgtk=; b=kiyLvAC7S/lhnjC3GIwFeJeqCvnsTFD7bODgMVcR5Gec3TIzxS6VzupwcGFED9B/wi JxHeoG8Y/V9hZi25YDsKVBjGEsFaXvymGh9SxKInAnEb75b/W/Khr3txKgYRIuNPjK+N LZxsCFYMp+nhjoU1frOtOe7bh4TOaUJIgLFPayU0+/esdjzweU+oS8vGf8AJhnjA+4n/ dx8C54GadGtq/NmmLzal0NoYWqPhOuteaS8sVrmbu57yK0Ry2kd7AmhiG9aUI0efTtgP 7vBsGVnLthbaGLBESYPurh4bbLmhbqx8DZpsFgeQplNIYUdWg2GVkNwDPa+PULBHw6OR VQxQ== X-Gm-Message-State: AOJu0YyJfU2tMwQZyidKvb/uM1fDHbgQm8eQXlX7R9PxEaxZjyB7ZsHi Y3ptdaKEl5wqbHdTBj9mw7kNcXAKHJTxkMInTs0QAV77E2uTn4J/hrA4G7fAugyFczN/KfLX6eW wxyHN1jjWRwIGdpvZj6cTK/bWxzpUTQ== X-Google-Smtp-Source: AGHT+IEqFvia7QVB0aRuGx+YB4vGlNdG7/fuKNFQASlcb0LhTSDyMrKd1/YsFNVnQKeIL/7nljFQ98o008X8+gU9+ys= X-Received: by 2002:a05:687c:2c11:b0:27b:66ea:add7 with SMTP id 586e51a60fabf-27c688bfda2mr12964033fac.4.1726758417470; Thu, 19 Sep 2024 08:06:57 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:6f90:0:b0:557:c384:fb61 with HTTP; Thu, 19 Sep 2024 08:06:57 -0700 (PDT) In-Reply-To: References: From: "David G. Johnston" Date: Thu, 19 Sep 2024 08:06:57 -0700 Message-ID: Subject: Re: How to make superuser from non superuser in PostgreSQL To: Sunil Jadhav Cc: "pgsql-admin@postgresql.org" Content-Type: multipart/alternative; boundary="000000000000161cfa06227a46c7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000161cfa06227a46c7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, September 19, 2024, Sunil Jadhav wrote: > > I don't know the superuser password? > > You will need to figure out a way to login as the (an?) existing superuser. Typically a password is not required since the pg_hba.conf file usually has a =E2=80=9Clocal postgres postgres peer=E2=80=9D (or equivalent= ) entry which lets the DBA become the OS postgres (or whatever user owns the service) user and then just connect to the cluster using the postgres role. Regardless, your ability to becomes superuser depends at this point on being able to become the OS user that owns the PostgreSQL service so you can modify pg_hba.conf to let you login. David J. --000000000000161cfa06227a46c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Thursday, September 19, 2024, Sunil Jadhav <sunilbjpatil@gmail.com> wrote:

I don't k= now the superuser password?


You will need to figure out a way to login as the = (an?) existing superuser.=C2=A0 Typically a password is not required since = the pg_hba.conf file usually has a =E2=80=9Clocal postgres postgres peer=E2= =80=9D (or equivalent) entry which lets the DBA become the OS postgres (or = whatever user owns the service) user and then just connect to the cluster u= sing the postgres role.=C2=A0 Regardless, your ability to becomes superuser= depends at this point on being able to become the OS user that owns the Po= stgreSQL service so you can modify pg_hba.conf to let you login.
<= div>
David J.

--000000000000161cfa06227a46c7--