OpenWrt Forum Archive

Topic: Multiuser Openwrt/luci

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
i compiled your multi-user modifikation with my SDK for trunk. First i managed to get it to work and i could run it on my system. Now i need to recompile it with the same SDK again but i always get a lot of merge conflicts. On the first time i compiled it without any errors. I tried it several times but always got the same errors. On Friday i did the same as today and it worked.
I tried alle branches of hnyman but i always get that merge conflict.
Sorry but i work with git only as much as possible and don´t know what to do.
Can anyone help me?

Thanks

can you update to latest tip of LuCI master ? the latest commits fix the issue of hidden Multi values

hostle19 wrote:

I have finished and tested the code. As far as I am concerned I have completed a full blown multi-user setup for luci/openwrt. I have added the ability to hide ANY menu from ANY non root user ... finally smile

Available Features
- add/remove users from the luci ui
- set ssh access to on or off on a per user basis
- set user type to user(basic ssh permissions) or admin(elevated ssh permissions)  per user basis
- set what luci ui menus options are visible and available for new users on a per user basis
- initial password for new users is openwrt, users can set there own password once logged in

Build Instructions
Just add the feed and update then you will see the pkg in the menuconfig under LuCI >> Modules called "admin-multi-user".

## LuCI 0.12 / 14.07 Barrier Breaker Branch ##
src-git luci https://github.com/Hostle/openwrt-luci- … ;luci-0.12

or the development branch
## LuCI trunk / Chaos Calmer Branch ##
src-git luci https://github.com/Hostle/openwrt-luci-multi-user.git

just add the appropriate feed to your "feeds.conf.default" and then put a "#" in front of the original luci feed and then update the luci feed

./scripts/feeds update luci
./scripts/feeds install -a -p luci

then you should see the new pkg in the menuconfig under LuCI >> Modules > admin-multi-user


The mods to the luci src are minimal, and luci functions fine when package is removed. Aside for the code added I have to rename a few files in the luasrc in the admin-full and admin-base but again this does not effect luci functionality . I think this could easily be pushed to the luci src and become a valuable tool in which the openwrt community could really benefit from. I have my own respo set up were the code can be fetched and built but ultimately I would like to see it become part of the luci repository or at least have the necessary changes made to the luci src to accommodate the multi-user package.


Sir,Could you add a function for hidding service later

thanks

Jack

Is it possible to get the Firewall sub menu to show when is enabled for a user?

Currently the "Firewall" link located under the "Network" menu do not show up even after being enabled and the user has been set as admin.

then forcing to access the admin menu, luci returns:

No page is registered at '/admin/network/firewall'.
If this url belongs to an extension, make sure it is properly installed.
If the extension was recently installed, try removing the /tmp/luci-indexcache file.

At a glance... it seems there is a slight typo in the /usr/lib/lua/luci/controller/firewall.lua file, on line 13

local name = "network"

Should be

local name = "Network"

The N in network should be upper case I believe... use winscp or the like to make the correction and let me know if that does it.

Hostle

That did it!

Wondering if it's possible to update the repo on github?

(Last edited by ronluna on 14 Feb 2017, 13:34)

@hostle19 thank you for your time and effort..great work...will try soon
so no update about luci-app yet ?

@hnyman, I downloaded your code and compiled the 'luci-app-multi-user'. After I installed it, my LuCI couldn't up,and told there had something wrong in"/usr/lib/lua/luci/controller/admin/users.lua:13: attempt to call field 'get_user' (a nil value)". I read the user.lua and luci.dispatcher.* , there are exactly no 'get_user' function. What I can do to run this code in my router. (my OpenWrt is trunk version)

You need to compile and install whole Luci.
Multiuser needs new support functions in base Luci components, so default vanilla Luci is not enough.

Hi, how can I incorporate the multiuser  into the "Image Builder" tool.

Greetings.

@hnyman Thank you very much! I will try it today.

@hnyman Hi, can you help me. How can I include the multiuser menu in the "Image Builder" tool. I get lost with linux compilations.

karlos1973 wrote:

@hnyman Hi, can you help me. How can I include the multiuser menu in the "Image Builder" tool. I get lost with linux compilations.

You can't. The compiled package is not available in download repos used by imagebuilder.

You need to compile the whole multiuser Luci by yourself.

@hnyman Thank you very much, I have been able to compile with the multiuser menu. How to limit access to parts of the firewall for a user? For example if I just want to give you access to "Firewall - Port Forwards" only

Hi all,

I currently use github.com/Fire-WRT/luci/commits/for-15.05 with OpenWRT 15.05.01. The multiuser feature works well.

No I tried to use luci-mod-rpc in addition, which always ends in a jsonrpc "Parse error", no matter what I request. E.g. executing locally:

#: curl --data-binary '{"jsonrpc": "2.0", "id": 1, "method": "login", "params": ["username", "password"]}' -H 'content-type:application/json;' 127.0.0.1/cgi-bin/luci/rpc/auth

which returns

#: {"id":null,"error":{"message":"Parse error.","code":-32700},"jsonrpc":"2.0"}

all the time. On a stock Luci/OpenWRT 15.05.01 it works like a charme :-(

Can you support me?

BR

marinux

(Last edited by marinux on 28 Aug 2017, 19:37)

marinux wrote:

Hi all,

I currently use github.com/Fire-WRT/luci/commits/for-15.05 with OpenWRT 15.05.01. The multiuser feature works well.

No I tried to use luci-mod-rpc in addition, which always ends in a jsonrpc "Parse error", no matter what I request. E.g. executing locally:

#: curl --data-binary '{"jsonrpc": "2.0", "id": 1, "method": "login", "params": ["username", "password"]}' -H 'content-type:application/json;' 127.0.0.1/cgi-bin/luci/rpc/auth

which returns

#: {"id":null,"error":{"message":"Parse error.","code":-32700},"jsonrpc":"2.0"}

all the time. On a stock Luci/OpenWRT 15.05.01 it works like a charme :-(

Can you support me?

BR

marinux

Have you tried the latest code from 3 months ago ? you can grab it here https://github.com/Fire-WRT/luci/tree/for-15.01-multi4 or by adding the path to your feeds.config.default

src-git luci https://github.com/Fire-WRT/luci.git;for-15.01-multi4

Hostle

Hello,

I need Install this packages in my GL-MT300A router.
OpenWrt Chaos Calmer 15.05 r47065 / LuCI for-15.05 branch

I am very new in Open Wrt, I only have 3 days with the system.

The files for installation directly from a repository are .ipk

How can I install the package from github?

I am a normal Windows user

I understand web server uses username and password of system to authenticate users and provided access . there is no update of users in L I G H T T P D configs and users folder is created in home directory .Can anyone please clarify on how web server uses Linux user information to authenticate users and proved web page access ? Is there any L U A library used for this purpose ?

(Last edited by mynamerp on 8 Mar 2018, 06:20)

HI,


I was interested in testing this project, but not having much experience in compiling a project would like to know if you use a simpler way to add this function, or if you would like to replace LUCI directly with multi user LUCI?

The discussion might have continued from here.