PluginsOCSInventory-NG / officepack

Retrieve microsoft office keys
GNU General Public License v2.0
15 stars 27 forks source link

Office 2016 data showed only with /force option #38

Open alexchini opened 6 years ago

alexchini commented 6 years ago

Hi i ve an issue with the plugin the data about office 16 are showed only if i lunch the OCSInventory.exe /force from command prompt in a windows client. All the versions server client plugin are the last i found. Thanks

gehasia commented 6 years ago

I upvote this one, plugin is unusable as this !

etherforea commented 6 years ago

+1

helicrenz commented 5 years ago

Hello @alexchini,

May i know what office plugin did you install? mine doesnt have any data may you please help

alexchini commented 5 years ago

Hi @helicrenz

I'm using the last version available the 2.0 of 09/2017 with ocs 2.5 but i had the same problems with the ocs 2.3.

The plugin for my case work only if you start the ocs client on your pc manually with OCSInventory.exe /force don't work if you start OCSInventory.exe as a windows service.

Keep in mind that ocs client use a vb script for parse the registy keys but unfortunally microsoft write the registry keys of the office versions in different positions and with different logic so some version of office are not find by ocs.

helicrenz commented 5 years ago

hello @alexchini,

I tried to install https://github.com/PluginsOCSInventory-NG/officepack/releases/tag/2.0. But im getting error.

image

its working other plugin but i cant manage to make it work 2.0. any idea?

alexchini commented 5 years ago

ah ur problem is on the server side, maybe the ocs log can give some lead.

As first idea, if u don't have done, check the files owner of the zip files in the download directory of the server. they must be apache or www-data this depend on the OS u r using.

helicrenz commented 5 years ago

@alexchini ,

Yes, i already check the permission its already www-data.

-rw-r--r-- 1 www-data www-data 34K Sep 27 15:55 officepack.zip -rwxr-xr-x 1 www-data www-data 127 Sep 24 11:24 README

I just confused why https://github.com/PluginsOCSInventory-NG/officepack/releases officepack 2.0 doesnt work. While this one work https://github.com/PluginsOCSInventory-NG/officepack/issues/34 but its unable to show the data office keys licensed.

helicrenz commented 5 years ago

i manage to fix mine. how do you automate the vbs script using ocs package? any suggestion

alexchini commented 5 years ago

the vbs script is load in the client by the OCSInventory.exe as you can see in the posts before. You can also manually run the vbs script in the client u should see some popup with the office license key, if you don't see nothing it mean the vbscript is not able to parse your office version

helicrenz commented 5 years ago

yes i manage to make it work. Do you think its possible to use OCS deployment to store the vbs script on each client of computer? or its better to use GPO?

alexchini commented 5 years ago

yes you can use the OCS deployment but you have to configure it in the right way, it is not possible tu run ocsinventory client as service, it must be scheduled in another way.

helicrenz commented 5 years ago

@alexchini really appreciate your feedback. i try to access http://192.168.1.30/download/ im getting 403 forbidden.

I already set the right permission

ls -lah /var/lib/ocsinventory-reports/download total 52K drwxrwxr-x 3 www-data www-data 4.0K Sep 28 12:08 . drwxr-xr-x 7 www-data www-data 4.0K Sep 24 11:24 .. drwxrwxrwx 2 www-data www-data 4.0K Sep 28 11:37 1538125954 -rwxrwxrwx 1 www-data www-data 34K Sep 27 13:21 officepack.zip -rwxrwxrwx 1 www-data www-data 5 Sep 28 12:08 test.html

errorlog

[Fri Sep 28 12:59:41.264380 2018] [autoindex:error] [pid 13609] [client 10.234.32.6:51816] AH01276: Cannot serve directory /var/lib/ocsinventory-reports/download/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive

Do you have any idea?

gehasia commented 5 years ago

@helicrenz can you check your /etc/apache2/conf-enabled/ocsinventory-reports.conf

You should have

<Directory /usr/share/ocsinventory-reports/ocsreports>
    # By default, users can use console from everywhere
      <IfModule mod_authz_core.c>
        # Apache 2.4
        Require all granted
          </IfModule>
          <IfModule !mod_authz_core.c>
        Order deny,allow
        Allow from all
      </IfModule>
    Options Indexes FollowSymLinks
    DirectoryIndex index.php
    AllowOverride Options

The "Options Indexes FollowSymLinks" is important here

Then check your download directory block :

<Directory /var/lib/ocsinventory-reports/download>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     Require all granted
   </IfModule>
   <IfModule !mod_authz_core.c>
     Order deny,allow
     Allow from all
   </IfModule>
</Directory>
Alias /download /var/lib/ocsinventory-reports/download

This directory should be seen as an Index on your browser (listing files inside)