Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Restrict access to Sarg Reports page

    Scheduled Pinned Locked Moved webGUI
    16 Posts 4 Posters 9.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vmz
      last edited by

      Hi, i need to restrict access for a specific user, only in a "Status \ Sarg Reports" page.

      Problem is that i have not found this section in User Manager section (Effective Privileges).

      Someone knows some solution for add this restriction?

      Thanks

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        If you need access to reports only, access it directly http://pfsense_IP/sarg-reports/

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • V
          vmz
          last edited by

          @marcelloc:

          If you need access to reports only, access it directly http://pfsense_IP/sarg-reports/

          Thanks marcelloc. But in this case (it works), everybody can access on sarg reports page.
          Maybe i need to protect /usr/local/www/sarg-reports with something like htpasswd.

          Any idea for do this in pfsense?

          1 Reply Last reply Reply Quote 0
          • marcellocM
            marcelloc
            last edited by

            @vmz:

            Any idea for do this in pfsense?

            I'm trying to create reports out of www dir and read it using php inside gui, but I didn't finished it yet.

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

            1 Reply Last reply Reply Quote 0
            • marcellocM
              marcelloc
              last edited by

              Finished! :)

              I've just published version 0.5 of sarg package with no direct access to sarg reports and included "WebCfg - Status: Sarg reports" user permission.

              Now you can create a restricted user with sarg reports view option only.

              att,
              Marcello Coutinho

              Treinamentos de Elite: http://sys-squad.com

              Help a community developer! ;D

              1 Reply Last reply Reply Quote 0
              • V
                vmz
                last edited by

                great marcelloc!  ;D

                And thanks for the fast solution.

                1 Reply Last reply Reply Quote 0
                • B
                  Bruco
                  last edited by

                  I'm sorry to resurrect this old thread, but it's exactly what I'm trying to do as well and I ran into issues.

                  If I create a user and assign only the WebCfg - Status: Sarg reports permission, then login with that user, it brings me to the Sarg reports page, but then gets stuck in an endless refresh loop.  I've tried with multiple browsers and have the same issue.

                  Is there some other permission, perhaps on the file level, that I should try making?

                  Thanks!

                  Edit: I should add that I'm accessing through http, and on a non-standard port, if that makes a difference.

                  1 Reply Last reply Reply Quote 0
                  • marcellocM
                    marcelloc
                    last edited by

                    Are you using the latest sarg package version?

                    Treinamentos de Elite: http://sys-squad.com

                    Help a community developer! ;D

                    1 Reply Last reply Reply Quote 0
                    • B
                      Bruco
                      last edited by

                      Looks like the package version is listed as 2.3.2 pkg v.0.6.1

                      1 Reply Last reply Reply Quote 0
                      • marcellocM
                        marcelloc
                        last edited by

                        I've found the problem, reinstall the package in 15 minutes(no version bump).

                        Thank´s for your feedback. :)

                        Treinamentos de Elite: http://sys-squad.com

                        Help a community developer! ;D

                        1 Reply Last reply Reply Quote 0
                        • B
                          Bruco
                          last edited by

                          No, thank YOU for your hard work!

                          I'll try re-installing later this evening and report back here with results.

                          1 Reply Last reply Reply Quote 0
                          • B
                            Bruco
                            last edited by

                            Works perfectly!  Thanks again; this is great functionality to have in pfSense!

                            1 Reply Last reply Reply Quote 0
                            • N
                              nutsonnet
                              last edited by

                              Hi,

                              Sorry for asking same info which may be clearly specified in this thread but it is little difficult for me to understand as new user to Ubuntu and Squid/sarg.

                              I am running Ubuntu server 12.04 with Squid 3.1 and using Sarg 2.3.2 to track usage of internet. I am not doing any billing or any fancy stuff with Sarg. Everythign works fine for the purpose.

                              I am able to access sarg reports when i do ipaddress/sarg as well. I want to remove open access to those reports and create users who can authencate and veiw reports. It will be great if somebody can give me detail process how can I assign approriate rights and create users who can just view generated reports only.

                              Thank you in advance.
                              Regards,

                              1 Reply Last reply Reply Quote 0
                              • marcellocM
                                marcelloc
                                last edited by

                                This package is for pfsense , not for ubuntu. ;)

                                on ubuntu, you need just an .htaccess on your apache dir/config

                                Treinamentos de Elite: http://sys-squad.com

                                Help a community developer! ;D

                                1 Reply Last reply Reply Quote 0
                                • N
                                  nutsonnet
                                  last edited by

                                  Thank you for reply can you please provide more detail.

                                  Regards,
                                  Chirag

                                  1 Reply Last reply Reply Quote 0
                                  • marcellocM
                                    marcelloc
                                    last edited by

                                    @nutsonnet:

                                    Thank you for reply can you please provide more detail.

                                    two usefull links  ;)

                                    http://bit.ly/VEOcgx

                                    http://sourceforge.net/p/sarg/discussion/363374/thread/ce485ee9

                                    TAG: user_authentication yes|no

                                    #    Allow user authentication in User Reports using .htaccess
                                    #    Parameters: 
                                    #    AuthUserFile    - where the user password file is
                                    #    AuthName    - authentication realm. Eg "Members Only"
                                    #    AuthType    - authenticaion type - basic
                                    #    Require        - authorized users to see the report.
                                    #                                          %u - user report

                                    user_authentication no

                                    AuthUserFile /usr/local/sarg/passwd

                                    AuthName "SARG, Restricted Access"

                                    AuthType Basic

                                    Require user admin %u

                                    Treinamentos de Elite: http://sys-squad.com

                                    Help a community developer! ;D

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.