SOLVED: LUCI add support user (in addition to root)

Hi;

I want to add a support user to luci web GUI

Had this working for a previous version of luci, following this guide from (defunct) OpenWrt forum:

https://forum.openwrt.org/viewtopic.php?pid=163013#p163013

which basically stated

  • create support user with UID, GUID = 0
  • alter /usr/lib/lua/luci/controller/admin/index.lua to read:
    "page.sysauth = {"root","support"}" from = "root"

which used to work...

did further research, found this:

which stated (plus change "post" to "call" in an entry)
-alter /usr/lib/lua/luci/controller/admin/servicectl.lua to read:
entry({"servicectl"}, alias("servicectl", "status")).sysauth = {"root","support"} from = "root"

Can still login as root, not as "support"

I do not want multiuser luci, just two users.

I am sure I am missing something simple.

Suggestions?
Regards;
Bill

Further info:

file: /usr/lib/lua/luci/dispatcher.lua, in function setup

            local login = util.ubus("session", "login", {
                    username = user,
                    password = pass,
                    timeout  = tonumber(luci.config.sauth.sessiontime)
            })

user and pass are OK, login is nil

the password contains "[" issue?

Last post provided "the clue": problem with ubus authentication. Not due to luci revision change, but with openwrt/ubus revision change.

Note: change "support" to required user ID

Full solution:

  • create support user with UID, GUID = 0 (for full access - change to taste)
  • alter /usr/lib/lua/luci/controller/admin/index.lua to read:
    "page.sysauth = {"root","support"}" from = "root"
    -alter /usr/lib/lua/luci/controller/admin/servicectl.lua to read:
    entry({"servicectl"}, alias("servicectl", "status")).sysauth = {"root","support"} from = "root"
  • NEW: add to /etc/config/rpcd:
config login
        option username 'support'
        option password '$p$support'
        list read '*'
        list write '*'
  • may need to reboot

this may provide sufficient clues to get luci-app-multi-user wotking again, for anyone so inclined.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.