Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

How to deploy agent through group policy or from ocs server

Hi,

We have deployed OCS server on Linux and we want to deploy OCS agent through Group policy of active directory.  Can anyone guide us how to create script for deploying or through group policy.

 

Regards,

Chaitanya
in OCS Inventory NG agent for Windows by (140 points)

1 Answer

0 votes
Hi Chaitanya,

 

This is roughly what I did:

OCS agent deployment on windows (communication with OCS server without SSL):
- download OCSNG-Windows-Agent
- download OCSNG-Windows-Packager
- download psexec (a sysinternals tools to start a program with the credentials of an other account)
- Start the packager
    Select the Agent installer.
    No cacert.pem
    command line options: /server=http://your.server.name/ocsinventory /ssl=0 /S
    user/password: account of an administrator (must be the same on all machines where the agent will be deployed)
    Click Next
    Select the folder where you want to create OCSPACKAGE.EXE.
    Click OK to create ocspackage.exe
- Test ocspackage.exe: start it on a machine where you are logged on with a normal user account.
- Upload ocspackage.exe to the ocsinventory server via: Config -> Agent
    Click Add file
    When you get the message: max_allowed_packet in MySQL < 2MB, you have to change a mysql setting:
      vi /etc/mysql/my.cnf
      change max_allowed_packet = 100M
      service mysql restart
      Upload the file again
- Create a group policy to install the agent:
    Start "group policy management" on your DC
    Create a policy "OCSinventory" in "group policy objects"
    Change the policy: Computer Configuration -> Policies -> Windows Settings -> Scripts (Startup/Shutdown)
    Double click Startup
    Click 'Show Files...' to start Windows explorer. It will show the group policy folder.
    Copy OCSLogon.exe to the group policy folder and close windows explorer.
    Click 'Add...'
    Click 'Browse...' and select ocslogon.exe
    Script parameters: /PACKAGER /SERVER=http://your.server.name/ocsinventory
    
    NB: You can also put OCSpackage.exe in the group policy folder and add /GPO as script parameter.
        ocslogon will use the file from the group policy folder instead of downloading it from the OCS server.
    
    Save the script and add the policy to an OU with computers.
    Test the policy first with one computer (add testcomputer name to GPO's security settings). If it works you can add "Domain Computers" to the security settings of the GPO.

 

Hope this will help :-)

 

regards,

Ruud
by (880 points)
Hello,

I'm having an issue with uploading ocsagent.exe to Config - Agent. It's telling me I exceeded  the 'max_allowed_packet' bytes and the file needs to be < 1MB but when I checked the my.conf file max_allowed_packet is set to 100M. The file I am trying to upload comes directly from ocs-ng dowloands and is only 1.15 MB. Any idea why I can't upload this file since it's small than 100MB?
Hi,

Check also your post_max_size and upload_max_filesize in your php.ini
 
Powered by Question2Answer
...