From 4999e231bcf79aec2a4e50833ffcff6591eaea00 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 17 Mar 2023 15:41:29 +1100 Subject: [PATCH] Avoid permission warning when running sudo as root The command is switching to an unprivileged user which can't access /root and therefore there was a warning when executing. Adding `--login` to the sudo command switches to that user properly and avoids the warning. --- GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index f82b982c1d..65b8cca69d 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -48,7 +48,7 @@ Fetch the latest version of `master` from `upstream` (ie. the main repo): First, you need to create the database user the app will use by manually typing the following in your terminal: ```sh -sudo -u postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PASSWORD 'f00d'" +sudo --login --user=postgres psql -c "CREATE USER ofn WITH SUPERUSER CREATEDB PASSWORD 'f00d'" ``` This will create the "ofn" user as superuser and allowing it to create databases. If this command fails, check the [troubleshooting section](#creating-the-database) for an alternative.