diff --git a/agents/plugins/mk_postgres.py b/agents/plugins/mk_postgres.py index 0a40a6483b6..09df3968c0a 100755 --- a/agents/plugins/mk_postgres.py +++ b/agents/plugins/mk_postgres.py @@ -784,7 +784,8 @@ def _run_sql_as_db_user( # type: (str, str, str, bool, bool) -> str base_cmd_list = [ "su", - "-", + "-s", + "/bin/sh", self.db_user, "-c", r"""PGPASSFILE=%s %s -X %s -A0 -F'%s' -f %s""",