Re: Creating a user for pg_start_backup

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Creating a user for pg_start_backup
Date: 2015-07-21 20:03:10
Message-ID: 55AEA57E.9010502@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7/21/2015 8:36 AM, Andrew Beverley wrote:
> Sorry to be dragging this off-topic, but what's the reason for using su instead of
> sudo?

sudo is for non root users, it ends up running the su command. normally
root doesn't use sudo at all, look at all the init.d scripts that run
daemons as other users, they typically use su, like...

$SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D
'$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 <
/dev/null

(where $SU is su or runuser)

--
john r pierce, recycling bits in santa cruz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-07-21 20:16:53 Re: Cannot reach pg server using -h localhost
Previous Message Fritz Meissner 2015-07-21 19:57:38 Re: Cannot reach pg server using -h localhost