Setting up access to specified parts of Admin Panel

Suggest improvements and new features for Gargoyle.

Moderator: Moderators

Post Reply
Vioner
Posts: 13
Joined: Thu Aug 09, 2012 9:13 pm

Setting up access to specified parts of Admin Panel

Post by Vioner »

Hello
I really miss the feature of adding new users to the Web Admin Panel.
It would be really useful feature. At my home... I have many people using the internet and I am the only one with some knowdledge of administrating, so only I've got the access to the panel.

However, I'd like to give my family members ability to check Bandwidth usage, so that they could find the one who causes LAGS without running around the house, from PC to PC.

So... I've tried to edit Bandwidth.sh file from /www directory (with the vi editor) and I've removed the line eval(& something about verificaton and cookies)

The effect was that I could access Bandwidth.sh page without logging in, but the graph's weren't working. Where else should I remove some lines to make this work properly without logging in ?

Or maybe you will make a plugin for multiple Admin Panel users with custom privilidges ?

Please answer me :)

Vioner
Posts: 13
Joined: Thu Aug 09, 2012 9:13 pm

Re: Setting up access to specified parts of Admin Panel

Post by Vioner »

I couldn't find the EDIT button, so I add a new post.

Here is how it looks after removing the line in Bandwidth.sh


Image

Vioner
Posts: 13
Joined: Thu Aug 09, 2012 9:13 pm

Re: Setting up access to specified parts of Admin Panel

Post by Vioner »

Image

Somebody please link all posts in one.

sajjadhalai
Posts: 108
Joined: Sun Apr 08, 2012 6:54 am

Re: Setting up access to specified parts of Admin Panel

Post by sajjadhalai »

cptive portal might slve tht problem. with some developing tricks

Vioner
Posts: 13
Joined: Thu Aug 09, 2012 9:13 pm

Re: Setting up access to specified parts of Admin Panel

Post by Vioner »

Isn't there any other easier way ?

Editing more files (removing cookie login line) won't help ?

I'd rather edit files on router than struggle with some captive portal.
I certainly will look into it, but initially it looks "too much to do/struggle".

Eric
Site Admin
Posts: 1441
Joined: Sat Jun 14, 2008 1:14 pm

Re: Setting up access to specified parts of Admin Panel

Post by Eric »

Edit /www/utility/load_bandwidth.sh and remove the eval line like you did in /www/bandwidth.sh

Vioner
Posts: 13
Joined: Thu Aug 09, 2012 9:13 pm

Re: Setting up access to specified parts of Admin Panel

Post by Vioner »

Thank you it worked, but partially.

When I go to the bandwidth.sh without logging in it looks like this.
(shows only whole bandwidth usage by default)

Image

So it's fine... but after picking a Name to show 3 gridlines 1-total usage 2- 1 pc 3 -3rd pc.

It shows only the bandwidth usage of device from which you are accessing the site.

Image

What else should be edited to make it work properly ?

EDIT: I forgot to mention that after editing files bandwidth.sh bandwidth_expanded.sh and /www/utilities/load_bandwidth.sh
the problem I showed you now occurs also when logged in.

Vioner
Posts: 13
Joined: Thu Aug 09, 2012 9:13 pm

Re: Setting up access to specified parts of Admin Panel

Post by Vioner »

Any ideas ?

Vioner
Posts: 13
Joined: Thu Aug 09, 2012 9:13 pm

Re: Setting up access to specified parts of Admin Panel

Post by Vioner »

Router just needed to be rebooted after editing the files. Everything works fine now.

I'd advise to add this to FAQ:
Free access to Bandwidth Usage (bandwidth.sh) site. (no logging in required):

Remove this line:

Code: Select all

 eval $( gargoyle_session_validator -c "$COOKIE_hash" -e "$COOKIE_exp" -a "$HTTP_USER_AGENT" -i "$REMOTE_ADDR" -r "login.sh" -t $(uci get gargoyle.global.session_timeout) -b "$COOKIE_browser_time"  )


in the following files stored in /www and /www/utility directories on your router:
[*]/www/bandwidth.sh
[*]/www/bandwidth_expand.sh (if you wan't to view high resolution graphs)
[*]/www/utility/load_bandwidth.sh

Post Reply