pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRename or Removing Postgres user
8+ messages / 6 participants
[nested] [flat]
* Rename or Removing Postgres user
@ 2019-02-14 06:49 Devendra Yadav <devendra.857@gmail.com>
2019-02-14 07:00 ` Re: Rename or Removing Postgres user Federico <rotellaro@gmail.com>
2019-02-14 07:24 ` Re: Rename or Removing Postgres user Shreeyansh Dba <shreeyansh2014@gmail.com>
2019-02-14 11:56 ` Re: Rename or Removing Postgres user John Wiencek <jwiencek3@comcast.net>
2019-02-14 12:30 ` Re: Rename or Removing Postgres user Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 4 replies; 8+ messages in thread
From: Devendra Yadav @ 2019-02-14 06:49 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Dear Postgres Experts,
I want to know if I rename 'postgres' user to 'someuser' retaining it's
privileges i.e superuser and other privileges.
Or what if I drop the 'postgres' user and create a new superuser. I tried
dropping Postgres user but it says "cannot drop role postgres because it is
required by the database system".
So my concern is what happens if I rename it. As far as I can check there's
no impact, but in case anyone has faced issues regarding this, please
suggest.
Thanks & Regards,
Devendra
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Rename or Removing Postgres user
2019-02-14 06:49 Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
@ 2019-02-14 07:00 ` Federico <rotellaro@gmail.com>
3 siblings, 0 replies; 8+ messages in thread
From: Federico @ 2019-02-14 07:00 UTC (permalink / raw)
To: Devendra Yadav <devendra.857@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org
AFAIK you cannot rename the postgres default super user. The name is set
with initdb.
On Thu, 14 Feb 2019, 07:50 Devendra Yadav, <devendra.857@gmail.com> wrote:
> Dear Postgres Experts,
>
> I want to know if I rename 'postgres' user to 'someuser' retaining it's
> privileges i.e superuser and other privileges.
>
> Or what if I drop the 'postgres' user and create a new superuser. I tried
> dropping Postgres user but it says "cannot drop role postgres because it is
> required by the database system".
>
> So my concern is what happens if I rename it. As far as I can check
> there's no impact, but in case anyone has faced issues regarding this,
> please suggest.
>
> Thanks & Regards,
> Devendra
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Rename or Removing Postgres user
2019-02-14 06:49 Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
@ 2019-02-14 07:24 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
3 siblings, 0 replies; 8+ messages in thread
From: Shreeyansh Dba @ 2019-02-14 07:24 UTC (permalink / raw)
To: Devendra Yadav <devendra.857@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Hi Devendra,
Session login user can not rename. You need to create a another super user,
log in as a new super user, and then rename default postgres user using
alter.
Thanks & Regards,
*Shreeyansh DBA Team*
www.shreeyansh.com
On Thu, Feb 14, 2019 at 12:20 PM Devendra Yadav <devendra.857@gmail.com>
wrote:
> Dear Postgres Experts,
>
> I want to know if I rename 'postgres' user to 'someuser' retaining it's
> privileges i.e superuser and other privileges.
>
> Or what if I drop the 'postgres' user and create a new superuser. I tried
> dropping Postgres user but it says "cannot drop role postgres because it is
> required by the database system".
>
> So my concern is what happens if I rename it. As far as I can check
> there's no impact, but in case anyone has faced issues regarding this,
> please suggest.
>
> Thanks & Regards,
> Devendra
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Rename or Removing Postgres user
2019-02-14 06:49 Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
@ 2019-02-14 11:56 ` John Wiencek <jwiencek3@comcast.net>
2019-02-14 12:15 ` Re: Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
3 siblings, 1 reply; 8+ messages in thread
From: John Wiencek @ 2019-02-14 11:56 UTC (permalink / raw)
To: Devendra Yadav <devendra.857@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org
Why do you want to do this considering you are prevented because it is REQUIRED?
Sent from my iPad
> On Feb 14, 2019, at 12:49 AM, Devendra Yadav <devendra.857@gmail.com> wrote:
>
> Dear Postgres Experts,
>
> I want to know if I rename 'postgres' user to 'someuser' retaining it's privileges i.e superuser and other privileges.
>
> Or what if I drop the 'postgres' user and create a new superuser. I tried dropping Postgres user but it says "cannot drop role postgres because it is required by the database system".
>
> So my concern is what happens if I rename it. As far as I can check there's no impact, but in case anyone has faced issues regarding this, please suggest.
>
> Thanks & Regards,
> Devendra
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Rename or Removing Postgres user
2019-02-14 06:49 Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
2019-02-14 11:56 ` Re: Rename or Removing Postgres user John Wiencek <jwiencek3@comcast.net>
@ 2019-02-14 12:15 ` Devendra Yadav <devendra.857@gmail.com>
2019-02-14 12:36 ` Re: Rename or Removing Postgres user Tim Cross <theophilusx@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Devendra Yadav @ 2019-02-14 12:15 UTC (permalink / raw)
To: John Wiencek <jwiencek3@comcast.net>; Shreeyansh Dba <shreeyansh2014@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org
Dear Shreeyansh,
Thanks a lot for your advice. I did it the same way you mentioned. Please
share if it has any pull off.
Dear John,
One of the main reason behind it is majorly Security. Can you help me with
the effects of doing so.
Thanks & Regards,
Devendra
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Rename or Removing Postgres user
2019-02-14 06:49 Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
2019-02-14 11:56 ` Re: Rename or Removing Postgres user John Wiencek <jwiencek3@comcast.net>
2019-02-14 12:15 ` Re: Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
@ 2019-02-14 12:36 ` Tim Cross <theophilusx@gmail.com>
2019-02-14 16:20 ` Re: Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Tim Cross @ 2019-02-14 12:36 UTC (permalink / raw)
To: Devendra Yadav <devendra.857@gmail.com>; +Cc: John Wiencek <jwiencek3@comcast.net>; Shreeyansh Dba <shreeyansh2014@gmail.com>; pgsql-admin@lists.postgresql.org
On Thu, 14 Feb 2019 at 23:15, Devendra Yadav <devendra.857@gmail.com> wrote:
> Dear Shreeyansh,
>
> Thanks a lot for your advice. I did it the same way you mentioned. Please
> share if it has any pull off.
>
>
> Dear John,
>
> One of the main reason behind it is majorly Security. Can you help me with
> the effects of doing so.
>
> Thanks & Regards,
> Devendra
>
Changing the name or disabling postgres is not going to have any
appreciable impact on improving security - in fact, you run the risk of
reducing security and potentially introducing other problems because you
are going to make your environment bespoke and possibly more complex to
work with. Many security weaknesses are the result of simple admin errors
rather than due to 'evit doers' attacking your system. Bottom line is that
all your database administrator accounts need to be hardened and secure
regardless of what name is used. By changing the name, you run the risk
that the account won't be included in audits and other security checks or
administrators will not recognise the level of sensitivity which should be
applied to the account. Far better off to use the standard account, but
make sure it is locked down with multiple layers of security.
--
regards,
Tim
--
Tim Cross
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Rename or Removing Postgres user
2019-02-14 06:49 Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
2019-02-14 11:56 ` Re: Rename or Removing Postgres user John Wiencek <jwiencek3@comcast.net>
2019-02-14 12:15 ` Re: Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
2019-02-14 12:36 ` Re: Rename or Removing Postgres user Tim Cross <theophilusx@gmail.com>
@ 2019-02-14 16:20 ` Devendra Yadav <devendra.857@gmail.com>
0 siblings, 0 replies; 8+ messages in thread
From: Devendra Yadav @ 2019-02-14 16:20 UTC (permalink / raw)
To: Tim Cross <theophilusx@gmail.com>; laurenz.albe@cybertec.at; +Cc: John Wiencek <jwiencek3@comcast.net>; Shreeyansh Dba <shreeyansh2014@gmail.com>; pgsql-admin@lists.postgresql.org
Thanks a ton Tim & Laurenz for your valuable suggestions.They are quite
considerable, I'll reevaluate on this.
Thanks and Regards
Devendra
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Rename or Removing Postgres user
2019-02-14 06:49 Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
@ 2019-02-14 12:30 ` Laurenz Albe <laurenz.albe@cybertec.at>
3 siblings, 0 replies; 8+ messages in thread
From: Laurenz Albe @ 2019-02-14 12:30 UTC (permalink / raw)
To: Devendra Yadav <devendra.857@gmail.com>; pgsql-admin@lists.postgresql.org
Devendra Yadav wrote:
> I want to know if I rename 'postgres' user to 'someuser' retaining it's privileges i.e superuser and other privileges.
>
> Or what if I drop the 'postgres' user and create a new superuser. I tried dropping Postgres user but it says "cannot drop role postgres because it is required by the database system".
>
> So my concern is what happens if I rename it. As far as I can check there's no impact, but in case anyone has faced issues regarding this, please suggest.
You can rename the user without any problems.
Internally, only the object ID of the role is used,
the name is just an entry in "pg_authid".
Resources outside the database proper, for example
configuration files like "pg_hba.conf", will have to
be adapted.
You cannot drop the "postgres" user, however.
You say further downthread that you want to do this
for security reasons. Keep in mind that this is the lowest
form of security: "security by obscurity".
For better security, make sure that the superuser can
only log in from the database machine itself, and that
only administrators get shell access there.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2019-02-14 16:20 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14 06:49 Rename or Removing Postgres user Devendra Yadav <devendra.857@gmail.com>
2019-02-14 07:00 ` Federico <rotellaro@gmail.com>
2019-02-14 07:24 ` Shreeyansh Dba <shreeyansh2014@gmail.com>
2019-02-14 11:56 ` John Wiencek <jwiencek3@comcast.net>
2019-02-14 12:15 ` Devendra Yadav <devendra.857@gmail.com>
2019-02-14 12:36 ` Tim Cross <theophilusx@gmail.com>
2019-02-14 16:20 ` Devendra Yadav <devendra.857@gmail.com>
2019-02-14 12:30 ` Laurenz Albe <laurenz.albe@cybertec.at>
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