Skip site navigation (1) Skip section navigation (2)

Re: How to know the password for the user 'postgres'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to know the password for the user 'postgres'
Date: 2008-10-28 12:57:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
Sam Mason <sam(at)samason(dot)me(dot)uk> writes:
> On Tue, Oct 28, 2008 at 10:42:47AM +0100, Thomas wrote:
>> An easy trick I have found to set postgres password: $ sudo passwd
>> postgres, and now you can type a new password. So now you can switch
>> user with: $ su postgres, and then connect to the DB with psql.

> Won't that allow logins to the postgres account then?

True, but that might be safer overall than giving out sudo privileges.
If the sysadmin and the DBA are the same person it hardly matters,
but if you want the DBA to not have root, then giving him a password for
the postgres account is the best way.  So it all depends on your
local situation ...

			regards, tom lane

In response to


pgsql-general by date

Next:From: Allan KamauDate: 2008-10-28 13:11:05
Subject: Re: Piping CSV data to psql when executing COPY .. FROM STDIN
Previous:From: Grzegorz JaƛkiewiczDate: 2008-10-28 12:50:48
Subject: Re: [Help] Config Failure on Mac OSX: psqlodbc-08.03.0300

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group