summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdrien Luxey <adrien@luxeylab.net>2019-10-22 13:48:02 +0200
committerRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-10-22 13:48:02 +0200
commit0327a00a3716d8f96ab1353613eca3a0eb813c65 (patch)
tree6e389e6877b14b434977469a20b0731f9a868f3a
parentDelete format_tap.py (#6219) (diff)
downloadsynapse-0327a00a3716d8f96ab1353613eca3a0eb813c65.tar.xz
Update postgres.md (#6234)
Added database owner authentication with `sudo` when `su` does not work
-rw-r--r--docs/postgres.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/postgres.md b/docs/postgres.md
index 29cf762858..7cb1ad18d4 100644
--- a/docs/postgres.md
+++ b/docs/postgres.md
@@ -27,17 +27,21 @@ connect to a postgres database.
 
 ## Set up database
 
-Assuming your PostgreSQL database user is called `postgres`, create a
-user `synapse_user` with:
+Assuming your PostgreSQL database user is called `postgres`, first authenticate as the database user with:
 
     su - postgres
+    # Or, if your system uses sudo to get administrative rights
+    sudo -u postgres bash
+  
+Then, create a user ``synapse_user`` with:
+
     createuser --pwprompt synapse_user
 
 Before you can authenticate with the `synapse_user`, you must create a
 database that it can access. To create a database, first connect to the
 database with your database user:
 
-    su - postgres
+    su - postgres # Or: sudo -u postgres bash
     psql
 
 and then run: