Dear Openwrt developers,
I want to try modifying the existing Single User implementation of LUCI to Multiuser.
I actually traced the authentication mechanism of the Login screen of LUCI. But I am stuck at this function which does the validation and cannot move ahead.
this the function:
function authenticator.htmlauth(validator, accs, default)
local user = luci.http.formvalue("luci_username")
local pass = luci.http.formvalue("luci_password")
if user and validator(user, pass) then
return user
end
require("luci.i18n")
require("luci.template")
context.path = {}
luci.template.render("sysauth", {duser=default, fuser=user})
return false
end
In this the "pass" value is being pulled from the FORM with testbox "luci_password"
Then it calls "VALIDATOR(user,pass)
I am guessing the "root" user is hardcoded in this validator function.
How can I tweak this code to get MultiUser support for LUCI login.