Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZsbV-00081g-W1 for pgsql-novice@arkaria.postgresql.org; Thu, 31 Mar 2022 11:04:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nZsbU-0004CT-TA for pgsql-novice@arkaria.postgresql.org; Thu, 31 Mar 2022 11:04:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZqU3-0002St-92 for pgsql-novice@lists.postgresql.org; Thu, 31 Mar 2022 08:48:47 +0000 Received: from mail-vk1-xa35.google.com ([2607:f8b0:4864:20::a35]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nZqU0-00014a-FP for pgsql-novice@lists.postgresql.org; Thu, 31 Mar 2022 08:48:46 +0000 Received: by mail-vk1-xa35.google.com with SMTP id p143so12983684vkf.5 for ; Thu, 31 Mar 2022 01:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vailschooldistrict.org; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=sMr6esDHH2gaqqBcUP5Op11ojzSyx6Sm0VfDA/vx/gc=; b=JomHAcmex4UTSff2Cbej7ggc5vE42TumVzmUJReXgLbjNkmFhP4Jzqv/ezPqOD2DqK E1AXrKC7xo7kURVaWCOnvy9EDuTaoTCsAPHn/CDpA4jgCvwv/pPi8z0/Uxv6ANnn8I9r vJ8EAZs0Mcplo0gsl+y+HLOc+o0e4wGPZGIcs/Xb5R0gRFbAv2cNsIO0U3hHnIMDY+oB huE4qajpTSQc6aIOsmJnxfH4gXqaHc2tCKT4RGEc3aRDhq1PViVosnC/htGI80deIN2i uyLDgFDtlErWhSy6lYceL91oTqXb3PC+x7BWxhkFq4ZU7/H2nX+uFM26WtdOnk4jzCAq hzMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=sMr6esDHH2gaqqBcUP5Op11ojzSyx6Sm0VfDA/vx/gc=; b=BttFv4QBGoUGDWI38Dzrlpz7Jb5fiNz874zW4cwf1dqnuu3Ke6WEsLRK+lPoqw/fiH 7L4lCVGwXt7qne1PoEEDCuZMbCEZ7ays1zJ5XUq1ocE+0a3WF0JxJP1zU8f4RddEyl2k M6uUJgcX6p9e0mDBi8OYJ9i563eOc0e0mb1YFAr484u3y2wkn8QgS5U5hQwPXofi2Xww EK5wlx+FqE+si212CF0ipVTP4eDPSrvk25OxwEgAQY828Kr/vWr4skp6lbQLUoP//yRy Y0Yh8QyiHBZ/7hzY2lqMXeXE+FYqtthyzM+OMsz/UGrJkPqFwqLXAZio1M4EA4LDmPgT 8n4g== X-Gm-Message-State: AOAM53093EjXN5c860Nhe4JomcCmI7xxPa+u6t/Fbpnlb3178t/a0sj0 nYTqIG8oiJ550RAmukJfOtRjm/f6R+XZPQ== X-Google-Smtp-Source: ABdhPJztcOwD73YXb0m/+whpqDBdO7SI/aCttp3frucc3xlOqtma0jVJRF3S7ewvV1R1SdcY1Quy3w== X-Received: by 2002:a05:6122:2229:b0:32d:1642:b58b with SMTP id bb41-20020a056122222900b0032d1642b58bmr1659178vkb.27.1648716523327; Thu, 31 Mar 2022 01:48:43 -0700 (PDT) Received: from [192.168.7.21] ([164.68.150.196]) by smtp.gmail.com with ESMTPSA id g11-20020ab0598b000000b0034a021faff9sm2591090uad.14.2022.03.31.01.48.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Mar 2022 01:48:42 -0700 (PDT) From: Mark Wallace X-Google-Original-From: Mark Wallace Message-Id: <9AEE31DA-0257-4B23-B107-FCA48E9F27C5@acm.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_8AC6550F-C7E3-4AA1-A680-DABEBF9F743D" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: ALTER DEFAULT PRIVILEGES Date: Thu, 31 Mar 2022 04:48:42 -0400 In-Reply-To: Cc: Fredrik Gustavsson To: "pgsql-novice@lists.postgresql.org" References: X-Mailer: Apple Mail (2.3608.120.23.2.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_8AC6550F-C7E3-4AA1-A680-DABEBF9F743D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 One revokes privileges only with the REVOKE command. See: PostgreSQL 9.5 documentation, pages 1642-1645. > On Mar 30, 2022, at 07:00, Fredrik Gustavsson = > wrote: >=20 > HelloTeam > =20 > I have a question on how to revoke privileges granted by another user > \ddp shows (Swedish names) > Owner | Schema | Type | = Access privileges > = --------------------+------------------------+----------+-----------------= -------------------------- > sbkrojo | kom_enhetskatalogen_v1 | table | = leveransdata_r=3Dr/sbkrojo + > | | = | leveransdata_w=3DarwdDxt/sbkrojo + > | | = | ponf_r=3Dr/sbkrojo + > | | = | tk_r=3Dr/sbkrojo > =20 > The two last lines is the ones I whish to get rid of > I tried the following sql statement > ALTER DEFAULT PRIVILEGES IN SCHEMA kom_enhetskatalogen_v1 revoke all = on tables from tk_r > but the grant is still present > Also tried to grant myown id to role sbkrojo,; > GRANT SBKROJO O MYID WITH ADMIN OPTION; > But I=E2=80=99m still not able to remove the privileges from tk_r. > Is there a way to achieve this ? > Sbkrojo is an old user no longer with our organization but I don=E2=80=99= t want to change the pwd for it since there are bach jobs running under = the same id. > We are running > postgres (PostgreSQL) 9.5.2 on windows server 2012. > Thanks for your support > =20 > Best regards > =20 > V=C3=A4nliga h=C3=A4lsningar >=20 > Fredrik Gustavsson >=20 > Systemadministrat=C3=B6r > Geodataavdelningen >=20 > G=C3=96TEBORGS STAD > Stadsbyggnadskontoret >=20 > Telefon: 031-36880801 > E-post: fredrik.gustavsson@sbk.goteborg.se = >=20 > Postadress: Box 2554, 403 17 G=C3=B6teborg > Bes=C3=B6k: K=C3=B6pmansgatan 20 > www.goteborg.se >=20 > S=C3=A5 h=C3=A4r behandlar stadsbyggnadskontoret dina personuppgifter = --Apple-Mail=_8AC6550F-C7E3-4AA1-A680-DABEBF9F743D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
One = revokes privileges only with the REVOKE command.

See: PostgreSQL 9.5 documentation, pages = 1642-1645.



On Mar 30, 2022, at 07:00, = Fredrik Gustavsson <fredrik.gustavsson@sbk.goteborg.se> wrote:

HelloTeam
 
I have a question on how to  revoke privileges granted = by another user
\ddp shows (Swedish names)
       = Owner        = |         = Schema         |   = Type   = |             = Access privileges
--------------------+------------------------+----------+------= -------------------------------------
sbkrojo         &n= bsp;  | kom_enhetskatalogen_v1 | table    | = leveransdata_r=3Dr/sbkrojo        =          +
          &nb= sp;         = |            &= nbsp;           = |        =             &n= bsp;           &nbs= p;   | = leveransdata_w=3DarwdDxt/sbkrojo       =     +
          &nb= sp;         = |            &= nbsp;           = |         =             &n= bsp;           &nbs= p;  | = ponf_r=3Dr/sbkrojo          =             &n= bsp;  +
          &nb= sp;         = |            &= nbsp;           = |        =             &n= bsp;           &nbs= p;  | tk_r=3Dr/sbkrojo
 
The two last lines is the ones I whish to get rid of
I = tried the following sql statement
ALTER DEFAULT PRIVILEGES IN SCHEMA  = kom_enhetskatalogen_v1 revoke all on tables from tk_r
but = the grant is still present
Also tried to grant myown id = to role sbkrojo,;
GRANT SBKROJO O MYID WITH ADMIN OPTION;
But = I=E2=80=99m still not able to remove the privileges from tk_r.
Is = there a way to achieve this ?
Sbkrojo is an old user no longer with our organization but I = don=E2=80=99t want to change the pwd for it since there are bach jobs = running under the same id.
We are running
postgres (PostgreSQL) 9.5.2 on windows server 2012.
Thanks for your support
 
Best regards
 
V=C3=A4nliga = h=C3=A4lsningar

Fredrik = Gustavsson

Systemadministrat=C3=B6rGeodataavdelningen

G=C3=96TEBORGS STAD
Stadsbyggnadskontoret


Telefon: 031-36880801
E-post: 
fredrik.gustavsson@sbk.goteborg.se

Postadress: Box 2554, = 403 17 G=C3=B6teborg
Bes=C3=B6k: K=C3=B6pmansgatan = 20

www.goteborg.se

S=C3=A5 h=C3=A4r behandlar stadsbyggnadskontoret = dina = personuppgifter

= --Apple-Mail=_8AC6550F-C7E3-4AA1-A680-DABEBF9F743D--