neonucleus/data/OpenOS/bin/useradd.lua
IonutParau 687cfebd00 testing version of LuaBIOS and OpenOS
people were having issues getting them to work so now we promote consistency
2025-06-28 20:41:49 +02:00

15 lines
287 B
Lua

local computer = require("computer")
local shell = require("shell")
local args = shell.parse(...)
if #args ~= 1 then
io.write("Usage: useradd <name>\n")
return 1
end
local result, reason = computer.addUser(args[1])
if not result then
io.stderr:write(reason..'\n')
return 1
end