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.

get the user logged in the agent [closed]

  • Version: OCS-NG_WINDOWS_AGENT_v2.10.1.0
  • PHP Version: 7.4.3
  • Database: Ubuntu 20.04 version 10.3.39-MariaDB-0ubuntu0.20.04.2
  • Version OCSReports: 2.9.2

I have created multiple users because I need to distinguish where the data is coming from (by database query). 

However, it seems that the agent is not sending the data (username) with which it connects to ocs. Is there any way to get it? In which table I can find this information?

closed with the note: Problem solved
in Agent for Windows development by (200 points)
closed by

1 Answer

+1 vote
 
Best answer

in old ocs-inventory Servers like 2.x it was stored in mysql in the hardware table under field userid

SELECT * FROM `hardware` WHERE userid like "testuser"

but the installed ocs-inventory agent does not send the user under which account the agent itself runs. It will report the logged on user i think.

The connected user information can change frequently, depending on who is using the machine at the time of inventory

In newer versions ocs-inventory ocs-inventory collects a connected user and a system user.

  • The machine user is generally considered the primary or assigned user of the device, regardless of who is currently using it.
  • The connected user reflects the account that was actively logged in when the OCS agent collected the inventory data.

by (24.4k points)
selected by
 
Powered by Question2Answer
...