From 1a73b5998b370bfebf9f7ce7597e4a29e2170120 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Tue, 27 Sep 2022 13:03:36 +0200 Subject: [PATCH] Fix "No passwd entry for user '-'" After the update of the shadow package from version 4.1.5.1 to 4.12.3, "su" changed its interpretation of the pattern su - - so that the second "-" is now interpreted as the username which leads to this error: starting /run/mariux/mxvip.bla.cfg .. starting /run/mariux/mxservice.bla.cfg .. No passwd entry for user '-' Fix this by coding the interpretation of "-" as "root", which is specific to mxstartup anyway, explicitly. --- mxservicectl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mxservicectl b/mxservicectl index 7b7fee3..1808f65 100755 --- a/mxservicectl +++ b/mxservicectl @@ -19,6 +19,8 @@ function mxsrv_start_one() { . ${cfg} + test "$MX_SRV_USER" = "-" && MX_SRV_USER="root" + case "${MX_SRV_SCRIPT}" in *.service) systemctl start "${MX_SRV_SCRIPT}" || true @@ -41,6 +43,8 @@ function mxsrv_stop_one() { . ${cfg} + test "$MX_SRV_USER" = "-" && MX_SRV_USER="root" + case "${MX_SRV_SCRIPT}" in *.service) systemctl stop "${MX_SRV_SCRIPT}" || true