From 3fe173558b4d5b66655292e6ae1dcbdb01bbfbbe Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Wed, 26 Nov 2025 22:42:22 +0200 Subject: [PATCH] dont assert user creation --- gen.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gen.lua b/gen.lua index 162acdb..228de88 100644 --- a/gen.lua +++ b/gen.lua @@ -3,6 +3,8 @@ local f = assert(io.open(out, "w")); local i = 0; +f:write("AllowAgentForwarding yes\n"); + for l in io.lines(conf) do i = i + 1; @@ -15,15 +17,14 @@ for l in io.lines(conf) do error(conf .. ":" .. i .. ": invalid syntax", 0); end - assert(os.execute("adduser -Ds /bin/false " .. user)); - assert(os.execute("passwd -d " .. user)); + os.execute("adduser -Ds /bin/sh " .. user); + os.execute("passwd -d " .. user); f:write("Match User ", user); - f:write("\n\tForceCommand ssh -o StrictHostKeyChecking=no -A ", params); + f:write("\n\tForceCommand echo ssh -o StrictHostKeyChecking=no ", params, " $SSH_ORIGINAL_COMMAND $SSH_AUTH_SOCK"); f:write("\n\tPubkeyAuthentication yes"); f:write("\n\tPasswordAuthentication yes"); - f:write("\n\tPermitEmptyPasswords yes"); - f:write("\n\tAllowAgentForwarding yes\n"); + f:write("\n\tPermitEmptyPasswords yes\n"); end end