dont assert user creation
This commit is contained in:
13
gen.lua
13
gen.lua
@@ -3,6 +3,8 @@ local f = assert(io.open(out, "w"));
|
|||||||
|
|
||||||
local i = 0;
|
local i = 0;
|
||||||
|
|
||||||
|
f:write("AllowAgentForwarding yes\n\n");
|
||||||
|
|
||||||
for l in io.lines(conf) do
|
for l in io.lines(conf) do
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
|
|
||||||
@@ -15,15 +17,14 @@ for l in io.lines(conf) do
|
|||||||
error(conf .. ":" .. i .. ": invalid syntax", 0);
|
error(conf .. ":" .. i .. ": invalid syntax", 0);
|
||||||
end
|
end
|
||||||
|
|
||||||
assert(os.execute("adduser -Ds /bin/false " .. user));
|
os.execute("adduser -Ds /bin/sh " .. user);
|
||||||
assert(os.execute("passwd -d " .. user));
|
os.execute("passwd -d " .. user);
|
||||||
|
|
||||||
f:write("Match User ", user);
|
f:write("Match User ", user);
|
||||||
f:write("\n\tForceCommand ssh -o StrictHostKeyChecking=no -A ", params);
|
f:write("\n\tForceCommand /usr/bin/ssh -o StrictHostKeyChecking=no -A ", params);
|
||||||
f:write("\n\tPubkeyAuthentication yes");
|
f:write("\n\tPubkeyAuthentication no");
|
||||||
f:write("\n\tPasswordAuthentication yes");
|
f:write("\n\tPasswordAuthentication yes");
|
||||||
f:write("\n\tPermitEmptyPasswords yes");
|
f:write("\n\tPermitEmptyPasswords yes\n");
|
||||||
f:write("\n\tAllowAgentForwarding yes\n");
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user