Skip to content

Commit

Permalink
Fix "No passwd entry for user '-'"
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
donald committed Sep 27, 2022
1 parent 608babf commit 1a73b59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mxservicectl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1a73b59

Please sign in to comment.