Develop multi-user areas for LuCI

I'm new user in this forum and I'm studying OpenWrt.
I've to create 3 roles to access at LuCI web interface, so I'll show different stuffs based on the user role.
I've search in forum but I don't understand if this topic can helps me!

Thank for reply in advance.


I've found a way to allow access for other user (user must exist on the machine).
Pratically I've edited next files:

config rpcd
	option socket /var/run/ubus.sock
	option timeout 30

config login
	option username 'root'
	option password '$p$root'
	list read '*'
	list write '*'

#add myuser
config login
	option username 'myuser'
	option password '$p$myuser'
	list read '*'
	list write '*'


page.title   = _("Administration")
page.order   = 10
page.sysauth = {"root", "myuser"} #I add here myuser (one or more)
page.sysauth_authenticator = "htmlauth"
page.ucidata = true
page.index = false = firstnode()

In this situation I can login with myuser and it has access r/w (like root).
Could i use this way?


I'm also in a similar situation as mentioned in the query. Were you able to solve it ?

User can be created, but the created user has root privileges and can change everything. I am having issues in creating multiple roles where in user with Role 1 --> Allowed to edit only a couple of options ( Say allowed to create firewall rules, add routes etc..)
Role 2 --> Allowed to only access administration settings and also allow to add interfaces, firmware upgrades etc..
Role 3 --> No edit options ( Only view)

  • RK

I've created a module to manage user permissions.
This module deletes from dispatcher the nodes/subnodes.
In my case, I've 2 users (tech and user), then you can edit /etc/config/rcpd and /usr/lib/lua/luci/index.lua as you want.
Download module
In this rar archive there is a tree folder. Put the files into the same directories in your OpenWrt.

/etc/config/nodes: All main nodes and subnodes
/etc/config/users: User-not-allowed Nodes and subnodes
/usr/lib/lua/luci/controller/admin/test.lua: ---DON'T CHANGE FILENAME--- search my post in this forum.

Login as root and you will find Manage users in System Menu.
If you find problems, contact me.

I hope it works.

Thanks @dennyv90.