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

SARG: LDAP module not compiled in sarg

Scheduled Pinned Locked Moved Portuguese
2 Posts 2 Posters 1.6k 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.
  • S
    shamuel_
    last edited by Jun 18, 2015, 2:27 PM Jun 18, 2015, 2:22 PM

    Olá galera,

    Estou tendo um problema com o sarg, não sei se está relacionado com o este suporte (http://sourceforge.net/p/sarg/support-requests/26/) como ele é bem antigo imagino que não. Porém no request do Murilo ele conseguia realizar report ao setar a OU em que os usuários se encontravam, aqui eu cheguei a setar a OU inteira, porém sem sucesso. Tentei modificar o caminho retirando os espaços por %20, coloquei e removi as aspas "", mudei a porta do LDAP de 389 para 3268. Alterei o BindUser pro administrator "CN=Administrator,…" porém até agora não consegui sucesso. Quando desativo o LDAP o report funciona!

    Poderiam me ajudar?

    sarg -x -z

    SARG: Init
    SARG: Loading configuration from /usr/local/etc/sarg/sarg.conf
    SARG: TAG: access_log /var/squid/logs/access.log
    SARG: TAG: graphs yes
    SARG: TAG: output_dir /usr/local/sarg-reports
    SARG: TAG: anonymous_output_files no
    SARG: TAG: resolve_ip no
    SARG: TAG: user_ip no
    SARG: TAG: topuser_sort_field BYTES normal
    SARG: TAG: user_sort_field BYTES normal
    SARG: TAG: exclude_users /usr/pbi/sarg-amd64/etc/sarg/exclude_users.conf
    SARG: TAG: exclude_hosts /usr/pbi/sarg-amd64/etc/sarg/exclude_hosts.conf
    SARG: TAG: date_format u
    SARG: TAG: lastlog 0
    SARG: TAG: remove_temp_files yes
    SARG: TAG: index yes
    SARG: TAG: index_tree file
    SARG: TAG: overwrite_report no
    SARG: TAG: use_comma yes
    SARG: TAG: exclude_codes /usr/pbi/sarg-amd64/etc/sarg/exclude_codes
    SARG: TAG: max_elapsed 0
    SARG: TAG: report_type topusers topsites sites_users users_sites date_time denied auth_failures site_user_time_date downloads
    SARG: TAG: usertab ldap
    SARG: TAG: LDAPHost 10.10.1.5
    SARG: TAG: LDAPBindDN "CN=pfsense,OU=Service Accounts,OU=IT Department,OU=MyOU,DC=myDomain,DC=local"
    SARG: TAG: LDAPBindPW MyPassword123
    SARG: TAG: LDAPBaseSearch "DC=myDomain,DC=local"
    SARG: TAG: LDAPFilterSearch sAMAccountName=%s
    SARG: TAG: long_url no
    SARG: TAG: date_time_by bytes
    SARG: TAG: charset UTF-8
    SARG: TAG: privacy no
    SARG: TAG: bytes_in_sites_users_report no
    SARG: TAG: topuser_num 0
    SARG: TAG: dansguardian_conf
    SARG: TAG: squidguard_conf /usr/pbi/squidguard-amd64/etc/squidGuard/squidGuard.conf
    SARG: TAG: redirector_log_format #year#-#mon#-#day# #hour# #tmp#/#list#/#tmp#/#tmp#/#url#/#tmp# #ip#/#tmp# #user# #end#
    SARG: TAG: show_sarg_info no
    SARG: TAG: show_sarg_logo no
    SARG: TAG: displayed_values bytes
    SARG: TAG: authfail_report_limit 0
    SARG: TAG: denied_report_limit 0
    SARG: TAG: siteusers_report_limit 0
    SARG: TAG: user_report_limit 0
    SARG: TAG: squidguard_report_limit 0
    SARG: TAG: www_document_root /usr/local/www
    SARG: TAG: ntlm_user_format domainname+username
    SARG: TAG: realtime_refresh_time 0
    SARG: TAG: realtime_types GET,PUT,CONNECT
    SARG: TAG: realtime_unauthenticated_records show
    SARG: TAG: sorttable /sarg_sorttable.js
    SARG: TAG: hostalias /usr/pbi/sarg-amd64/etc/sarg/hostalias
    SARG: Loading exclude host file from: /usr/pbi/sarg-amd64/etc/sarg/exclude_hosts.conf
    SARG: Loading exclude file from: /usr/pbi/sarg-amd64/etc/sarg/exclude_users.conf
    SARG: Reading host alias file "/usr/pbi/sarg-amd64/etc/sarg/hostalias"
    SARG: List of host names to alias:
    SARG: Deleting temporary directory "/tmp/sarg"
    SARG: Parameters:
    SARG:          Hostname or IP address (-a) =
    SARG:                    Useragent log (-b) =
    SARG:                    Exclude file (-c) = /usr/pbi/sarg-amd64/etc/sarg/exclude_hosts.conf
    SARG:                  Date from-until (-d) =
    SARG:    Email address to send reports (-e) =
    SARG:                      Config file (-f) = /usr/local/etc/sarg/sarg.conf
    SARG:                      Date format (-g) = USA (mm/dd/yyyy)
    SARG:                        IP report (-i) = No
    SARG:            Keep temporary files (-k) = No
    SARG:                        Input log (-l) = /var/squid/logs/access.log
    SARG:              Resolve IP Address (-n) = No
    SARG:                      Output dir (-o) = /usr/local/sarg-reports/
    SARG: Use Ip Address instead of userid (-p) = No
    SARG:                    Accessed site (-s) =
    SARG:                            Time (-t) =
    SARG:                            User (-u) =
    SARG:                    Temporary dir (-w) = /tmp/sarg
    SARG:                  Debug messages (-x) = Yes
    SARG:                Process messages (-z) = Yes
    SARG:  Previous reports to keep (–lastlog) = 0
    SARG:
    SARG: sarg version: 2.3.9 Sep-21-2014
    SARG: Loading User table: ldap
    SARG: LDAP module not compiled in sarg

    ldapsearch -x -h 10.10.1.5 -p 389 -s sub -D "CN=pfsense,OU=Service Accounts,OU=IT Department,OU=MyOU,DC=MyBusiness,DC=local" -w "Change123" -b "dc=MyBusiness,dc=local" "(sAMAccountName=alice)" cn

    extended LDIF

    LDAPv3

    base <dc=mybusiness,dc=local>with scope subtree

    filter: (sAMAccountName=alice)

    requesting: cn

    alice, IT Users, IT Department, MyBusiness, MyBusiness.local

    dn: CN=alice,OU=IT Users,OU=IT Department,OU=MyOU,DC=MyBusiness,DC=local
    cn: alice

    search reference

    ref: ldap://ForestDnsZones.MyBusiness.local/DC=ForestDnsZones,DC=MyBusiness,DC
    =local

    search reference

    ref: ldap://DomainDnsZones.MyBusiness.local/DC=DomainDnsZones,DC=MyBusiness,DC
    =local

    search reference

    ref: ldap://MyBusiness.local/CN=Configuration,DC=MyBusiness,DC=local

    search result

    search: 2
    result: 0 Success

    numResponses: 5

    numEntries: 1

    numReferences: 3</dc=mybusiness,dc=local>

    editado pra adicionar o system.log:

    Jun 18 11:00:00 firewall php: sarg.php: Sarg: force refresh now with -d date +%d/%m/%Y args, compress() and none action after sarg finish.
    Jun 18 11:00:00 firewall php: sarg.php: The command 'export LC_ALL=C && /usr/pbi/sarg-amd64/bin/sarg -d date +%d/%m/%Y' returned exit code '1', the output was 'SARG: LDAP module not compiled in sarg'

    1 Reply Last reply Reply Quote 0
    • W
      welbertebispo
      last edited by Oct 9, 2015, 12:28 PM

      Olá amigo, tudo bem?

      Também passei por isso e consegui resolver desmarcando a opção Enable LDAP Search na aba Users e inserindo todos os IPs da LAN no campo Exclude Users. Assim, o comando sarg -x gerou o arquivo index.html e começou a gerar os arquivos.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received