When executing "glpi-inventory --partial user --debug", on "context:hardware" section, "lastloggeduser" filed is trimmed to 8 characters.
This field is populated on line 153 of lib/GLPI/Agent/Task/Inventory/Generic/Users.pm using "last" command, which will trim usernames longer than 8 characters, to avoid this a "-w" flag must be used.
To reproduce
Install last GPLI agent for Linux:
$ glpi-agent --version
GLPI Agent (1.10-1)
Built by Debian
Source time: 2024-07-09 09:29
Execute inventory:
glpi-inventory --partial user --debug
Expected behavior
lastloggeduser must show full username, not trimmed to 8 characters
Bug reporting acknowledgment
Yes, I read it
Professional support
Yes, I know
Describe the bug
When executing "glpi-inventory --partial user --debug", on "context:hardware" section, "lastloggeduser" filed is trimmed to 8 characters.
This field is populated on line 153 of lib/GLPI/Agent/Task/Inventory/Generic/Users.pm using "last" command, which will trim usernames longer than 8 characters, to avoid this a "-w" flag must be used.
To reproduce
glpi-inventory --partial user --debug
Expected behavior
lastloggeduser must show full username, not trimmed to 8 characters
Operating system
Linux
GLPI Agent version
v1.10
GLPI version
10.0.16
GLPIInventory plugin or other plugin version
Not applicable
Additional context
No response