question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discussion on Luci multi-user features

See original GitHub issue

@Hostle has created a functional system for enabling handling multiple users in Luci.

  • User creation, removal and provisioning work.
  • Two user classes: admin and user. (root has always full access.)
  • Possibility to adjust access on menu-item level
  • Possibility to deny ssh access

@Hostle has actually created two alternative methods for a year-old Luci (from March 2015, CC15.05 development cycle) into his Github repo. I have imported the changes into up-to-date DD trunk and have also squashed and polished the commits for discussion purposes to have minimal diffs.

Hostle thinks that the newer method is better, so I will present that here.

Original discussion at forum: https://forum.openwrt.org/viewtopic.php?id=54593 Discussion also at: https://github.com/Hostle/luci/commit/c1ba7d780fbafba1d882e3d05ff96baeaee131f3#commitcomment-15451559

“New method”:

“New” original, commits from Hostle, updated in April 2017: https://github.com/Fire-WRT/luci/commits/multi4

“New” cleaned-up version from my repo, “multi4-clean” branch, contains four squashed commits targeting LEDE & Openwrt DD trunk/master: https://github.com/hnyman/luci/commits/multi4-clean (March2018: I have rebased multi4 branch history with the LuCI of June 2017.)

Trying the code:

If you want to try the multi-user code, you can easily add my Luci repo as a remote to your own git and then pull from “multi4-clean” branch. The multi4-clean branch contains up-to-date LuCI of 26 June 2017.

I used these commands to import this to my own Openwrt build. (I also created a new branch “multiuser” at my local feed repo so that I easily push the changes aside by “git checkout master”):

 cd feeds/luci
 git checkout 6047dacb6253c
 git checkout -b multiuser
 git remote add hnyman https://github.com/hnyman/luci.git
 git pull hnyman multi4-clean
 git log --oneline

Alternatively, you can download the 4 commits as patches from github and apply them manually. (just add .patch to the end of the commit’s page address and you get a patch that can be download with wget.)

Identified problems/challenges:

NOTE: old, reflects 2015 observations

Screenshot from trunk Designated Driver r48235: multiuser1

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:233 (44 by maintainers)

github_iconTop GitHub Comments

5reactions
Fire-Wrt-2016commented, Dec 11, 2019

We are currently working on the a new version that will work with the many changes made in the 19.07 branch. There is a beta version in the Fire-WRT repo but there’s much more work to be done before a stable version is available. Sit tight … maybe Santa will bring the new version 😉

On Wed, Dec 11, 2019, 12:40 PM alisaeed, notifications@github.com wrote:

Hi @Fire-WRT https://github.com/Fire-WRT @hnyman https://github.com/hnyman

First, I want to thank your for your Codes and modules you put before, I used them and they were very useful. I used LEDE17 and I didn’t have any problem. Now I need to migrate to Openwrt19, but I can not use your code in Openwrt19. How I can solve this problem? Could you please help me about this and is there any new development on your codes for Openwrt19?

Thanks for your help and waiting to receive your reply very soon.

Kind regards –Ali

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openwrt/luci/issues/623?email_source=notifications&email_token=AE4EW5NK7QLNJV4RXBWPYWTQYEQ2TA5CNFSM4BYUE42KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGT7C3Q#issuecomment-564654446, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4EW5NXT5O4FMKY7G3V5KTQYEQ2TANCNFSM4BYUE42A .

2reactions
privacyrickcommented, Mar 28, 2020

Hello Everyone! @Fire-WRT @hnyman @Hostle @nasafix-nasser

I’ve been following this thread for awhile. I’ve been really trying to implement multiple users with menu access permissions. All in all, I think the multi-user-app is a great solution but of course it has its kinks, especially in trying to migrate it into OpenWRT v19 Stable Branch.

So far I’ve been able to successfully adapt the code for use in v19 with the ability to create, edit, and delete users as seen below: Screenshots: Multi-User Capture

Edit-User Capture

But I’m getting several odd errors that I’m hoping someone can point me in the right direction in solving.

Error 1: Firstly I’m able to login normally with either or root of my created user but there’s a weird error on the login screen. Browser Console returns: Error: “No related RPC reply” flushRequestQueue /luci-static/resources/luci.js?v=git-20.087.56959-ed1fc63:44 luci.js:103:9 Screenshot: Multi-User Login Error Capture

Error 2: Secondly, when editing a new user, not all of my available SubMenus nor my available Page Tabs come up as options to enable/disable for the user. The panel will include some Page Tabs but not others as well as some SubMenus but not others. Example: Edit-Menus Capture

Error 3: Additionally, not so much an error, but when a user is created using the Edit Users menu, there isn’t a way to set a password for that user. In order to allow the new user to login to LuCi, you have to set a password for the new user via CLI using passwd command in this case. Also, if you add another user, then delete that user, for whatever reason, it also wipes the password for the first user so you have to set the password for that user via CLI again.

Error 4: And finally, when actually enabling menus for a user, it will successfully show those menu items when the user is logged in but none of the pages will load except for the password page added by the module. Rather than loading, Luci throws RPC errors similar to the error on the login screen but my browser console returns the following: Error: “No related RPC reply” flushRequestQueue /luci-static/resources/luci.js?v=git-20.087.56959-ed1fc63:44 luci.js:103:9

Error: “No related RPC reply” flushRequestQueue /luci-static/resources/luci.js?v=git-20.087.56959-ed1fc63:44 luci.js:103:9 Screenshot: TestUser Error Capture

That’s everything I’ve been able to find in my experimentation but to be frank, these issues have got me stumped. Hopefully someone can help me out and maybe even publish this new version so others can start using it. Thanks in advance!

Cheers, Rick

Read more comments on GitHub >

github_iconTop Results From Across the Web

Topic: Multiuser Openwrt/luci
Topic: Multiuser Openwrt/luci · 1) renames of existing modules (network, routes, admin, system) and the fallout from that (themes, controller) · 2 ...
Read more >
(PDF) Principles of Designing Multi-User User Interface ...
These principles address the functionality and architecture of a multi-user UIDE and the programs supported by it. Keyword Codes: C.2.4; ...
Read more >
Multiuser Systems (Chapter 14) - Wireless Communications
We will discuss multiuser channel capacity regions for both the uplink and the downlink. We also consider random access techniques, whereby signaling ...
Read more >
Easy multi-user LXD setup - Desktop - Ubuntu Community Hub
One nifty new feature of the newly released LXD 4.22 is the ability for regular users to safely interact with LXD. Until now,...
Read more >
OpenWrt: LuCI: how to implement limited user access
Goal: two users root and user. Root can access everything via web-interface, but user should see only some parts of the menus. One...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found