From 12d9d97baaff3bc4bd4910647f5de3378be0cf6e Mon Sep 17 00:00:00 2001 From: Randy Barlow Date: Sun, 10 Dec 2017 12:52:22 -0500 Subject: [PATCH] Use /bin/sh as the explicit shell when using su in ejabberdctl. Some distributions (such as Fedora) use /sbin/nologin as the login shell for the ejabberd user. The newer version of ejabberdctl uses su to perform the command if the INSTALLUSER invokes the script. This commit adjusts the call to su so that it passes /bin/sh as the shell to use so that it will work correctly when the ejabberd user's shell is set to nologin. Signed-off-by: Randy Barlow --- ejabberdctl.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ejabberdctl.template b/ejabberdctl.template index 836377662..571b90b66 100755 --- a/ejabberdctl.template +++ b/ejabberdctl.template @@ -110,7 +110,7 @@ export ERL_LIBS exec_cmd() { case $EXEC_CMD in - as_install_user) su -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;; + as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;; as_current_user) "$@" ;; esac }