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.

Agent not sending password to server

I'm doing a headless install of the OCS agent 2.1.1 on Windows 7 Professional. My server has HTTP authentication enabled, but the agent doesn't appear to be behaving as expected. I'm installing using this script:

@echo off
bitsadmin /transfer ocsdl /download /priority normal https://inventory/files/OCS-NG-Windows-Agent-Setup.exe %TMP%\OCS-NG-Windows-Agent-Setup.exe
%TMP%\OCS-NG-Windows-Agent-Setup.exe /s /now /server=http://ocs/ocsinventory /user=ocsinventory /pwd=xxxxxxxx
del %TMP%\OCS-NG-Windows-Agent-Setup.exe

The server is installing successfully, but when I log the content of the Authorization header being received by the OCS server, as well as the HTTP response code, I see this:

10.100.132.85 - - - [10/Mar/2015:15:12:50 -0400] "POST /ocsinventory HTTP/1.1" 401 735 "-" "OCS-NG_WINDOWS_AGENT_v2.1.1.1"
10.100.132.85 - ocsinventory Basic b2NzaW52ZW50b3J5Og== [10/Mar/2015:15:12:50 -0400] "POST /ocsinventory HTTP/1.1" 401 735 "-" "OCS-NG_WINDOWS_AGENT_v2.1.1.1"

That base 64 string decodes as "ocsinventory:" -- the password section is being left empty. Why is this?

I should mention that if I run OCSInventory.exe with /user and /pwd set, the authorization is successful. All of my Linux clients work properly. The server runs OCS 2.1.2, Debian 7, and Apache 2.2.22.


Client log:

==============================================================================
Starting OCS Inventory NG Agent on Tuesday, March 10, 2015 15:35:31.
AGENT => Running OCS Inventory NG Agent Version 2.1.1.1
AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.1
AGENT => Loading plug-in(s)
    DLL PLUGIN => Searching for Plug-in DLL(s) in folder <C:\Program Files (x86)\OCS Inventory Agent\plugins>
    DLL PLUGIN => 0 DLL Plug-in(s) succesfully loaded on 0 DLL(s) found
AGENT => Using network connection with Communication Server
    COM PROVIDER => Loading Communication Provider <C:\Program Files (x86)\OCS Inventory Agent\ComHTTP.dll>
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.1.1.1>
AGENT => Sending Prolog
    DID_CHECK => Read DeviceID <xxxxxxxxx-2015-03-10-12-43-07> and MACs <xx:xx:xx:xx:xx:xx> in file <ocsinventory.dat>
    COM SERVER => Initializing cURL library for sendRequest
    COM SERVER => Using cURL with server authentication
    COM SERVER => Disabling cURL proxy support
    COM SERVER => Enabling cURL SSL server validation support using CA Bundle <C:\ProgramData\OCS Inventory NG\Agent\cacert.pem>
    COM SERVER => Sending HTTP Post request to URL <http://ocs/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #401>
    COM SERVER => Cleaning cURL library
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #401>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:00.

in OCS Inventory NG agent for Windows by (190 points)
edited by

1 Answer

0 votes
 
Best answer
I've found the problem: I was using a 32-character password. It worked when I switched to a shorter password. This is apparently either a bug or an undocumented limitation.
by (190 points)
edited by
 
Powered by Question2Answer
...