quote "remote user", ensuring user is handled as one parameter

This commit is contained in:
tom 2018-10-11 19:00:44 +02:00
parent 5761939fa9
commit c950dd1e90

View file

@ -135,10 +135,10 @@ elif [ "$state" = "absent" ]; then
if grep -q "^${name}:" "$__object/explorer/passwd"; then
#user exists, but state != present, so delete it
if [ -f "$__object/parameter/remove-home" ]; then
printf "userdel -r %s >/dev/null 2>&1\n" "${name}"
printf "userdel -r '%s' >/dev/null 2>&1\n" "${name}"
echo "userdel -r" >> "$__messages_out"
else
printf "userdel %s >/dev/null 2>&1\n" "${name}"
printf "userdel '%s' >/dev/null 2>&1\n" "${name}"
echo "userdel" >> "$__messages_out"
fi
fi