
Helpdesk, Part 4: Tech Accounting in GLPI — Users from Active Directory and Automatic Inventory via GLPI Agent
🌐 Machine-translated from Russian. Show original
In this part:
- What we will get
- Step 1. Service account in AD
- Step 2. Connecting LDAP to GLPI
- Step 3. Importing and synchronizing users
- Step 4. Enable inventory in GLPI
- Step 5. GLPI Agent on Windows
- Step 6. GLPI Agent on Linux
- Step 7. Network equipment, printers, UPS
- Step 8. What to do with the result
- Adult inventory: the process
What we will get#
- Employees log into GLPI with a domain login and password; their cards (full name, mail, phone, department) come from AD.
- Each computer sends to GLPI once a day: model, serial number, processor, memory, disks, monitors, installed software, and the end user.
- The "laptop not working" request is immediately linked to the specific device and its history.
Step 1. Service account in AD#
Create a user svc-glpi — a regular domain user without administrative rights, a complex password, "password expiration date" (and save it to the password manager). This is enough to read the directory.
At the same time, create a GLPI-Users group (who can sign in) and, if desired, GLPI-Tech (techniques). About AD and groups — in the "Active Directory and Group Policies" series.
Step 2. Connecting LDAP to GLPI#
Configuring → Authentication → LDAP directories → Add (you can use the Active Directory preset — it will fill in the fields):
| Field | Value |
|---|---|
| Server | dc01.company.local (better ldaps://dc01.company.local) |
| Port | 389 (LDAP) or 636 (LDAPS) |
| BaseDN | OU=Company,DC=company,DC=local |
| RootDN (connection account) | svc-glpi@company.local |
| Password | password svc-glpi |
| Login field | samaccountname |
| Connection filter | see below |
Filter: only enabled users from the GLPI-Usersgroup:
(&(objectClass=user)(objectCategory=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(memberOf=CN=GLPI-Users,OU=Groups,DC=company,DC=local))
Add a second domain controller in the Replicas tab — if the first is unavailable, login will continue to work.
On the Users tab, match the fields: last name sn, first name givenname, email mail, phone telephonenumber, titleposition, department — department. On the Groups tab — search for groups in users by attribute memberof.
The Check button should show a successful connection.
🔐 For LDAPS, the GLPI server must trust the domain controller certificate: copy your certification authority's root certificate to
/usr/local/share/ca-certificates/and runsudo update-ca-certificates.
Step 3. Importing and synchronizing users#
Administration → Users → LDAP directory → Import new users — find and import. Users are also created automatically upon first sign-in.
Synchronization of changes (department changed, dismissed) — according to the schedule:
echo '30 6 * * * www-data /usr/bin/php /var/www/glpi/bin/console ldap:synchronize_users -n' | sudo tee /etc/cron.d/glpi-ldap
List of command parameters: sudo -u www-data php bin/console ldap:synchronize_users --help (also there — what to do with users removed from AD).
Rights through AD groups#
Administration → Rules → Authorization Rules — "if a user in the group GLPI-Tech → the Technician profile, the Company entity." All others receive the Self-Service profile (only their own requests). Now rights in GLPI are granted by adding them to the AD group.
Step 4. Enable inventory in GLPI#
With GLPI 10, inventory is built-in — no separate plugin is needed.
Administration → Inventory → enable Enable Inventory and save. Import rules are also configured here: what to do with software, monitors, virtual machines, how to handle devices that no longer exist.
The agent sends data to the root GLPI address, such as https://glpi.company.local/. Make sure this address is accessible from the workstation network.
Step 5. GLPI Agent on Windows#
Download MSI from github.com/glpi-project/glpi-agent/releases — as of November 2026, this is GLPI-Agent-1.21-x64.msi. Documentation: glpi-agent.readthedocs.io.
Silent installation (from cmd, not PowerShell):
msiexec /i GLPI-Agent-1.21-x64.msi /quiet SERVER=https://glpi.company.local/ RUNNOW=1 ADD_FIREWALL_EXCEPTION=1 EXECMODE=1
| Parameter | Value |
|---|---|
SERVER | GLPI address (can be separated a few commas) |
RUNNOW=1 | send inventory immediately after installing |
ADD_FIREWALL_EXCEPTION=1 | add a rule to Windows Firewall |
EXECMODE=1 | to work as a Windows service (default) |
The full list of parameters is in the Windows command line documentation section.
Bulk through Group Policy#
The easiest way is the computer startup script:
- Place MSI in a shared folder readable to the domain's computers (
\\company.local\NETLOGON\glpi\). - Script
install-glpi-agent.cmd:
@echo off
if exist "C:\Program Files\GLPI-Agent\glpi-agent.bat" exit /b 0
msiexec /i "\\company.local\NETLOGON\glpi\GLPI-Agent-1.21-x64.msi" /quiet SERVER=https://glpi.company.local/ RUNNOW=1 ADD_FIREWALL_EXCEPTION=1 EXECMODE=1
- GPO on the OU with computers: Computer Configuration → Policies → Windows Configuration → Scripts → Startup → add a script.
Check the installation path on one PC manually and change the verification condition to the version number when updating the agent.
Step 6. GLPI Agent on Linux#
On the same release page, there is a universal installer glpi-agent-1.21-linux-installer.pl (for Debian/Ubuntu, RHEL, etc.):
wget https://github.com/glpi-project/glpi-agent/releases/download/1.21/glpi-agent-1.21-linux-installer.pl
perl glpi-agent-1.21-linux-installer.pl --help # все параметры
sudo perl glpi-agent-1.21-linux-installer.pl --server="https://glpi.company.local/" --runnow
Compare the installer settings against the --help output for your version. Check manually:
sudo glpi-agent --force
sudo systemctl status glpi-agent
For macOS, there is a .pkgpackage on the releases page.
Step 7. Network equipment, printers, UPS#
The agent can use NetDiscovery (network device search) and NetInventory (SNMP polling: ports, MAC addresses, serial numbers, printer page counters). Tasks are configured in GLPI for the selected "scanner" agent in the required subnet. Enable on SNMPv3 or v2c devices with long community and IP agent-only access — as for monitoring in the "Monitoring: Zabbix, Prometheus, and Grafana" series.
Step 8. What to do with the result#
- Assets → Computers — list of all PCs: filters by model, OS, memory size, latest inventory.
- PC card → tabs Software, Components, History (visible when the disk was replaced or memory added).
- The last logged in user is mapped to the account from AD — it's immediately clear whose laptop it is.
- License → management — match the installed software with purchased licenses (Windows, Office, 1C, antivirus) and see any shortages or extras.
- Management → Contracts and Suppliers — warranties, leases, expiration dates with notices.
What the agent does not find out himself#
Accounting inventory number, place (office), materially responsible person, purchase date, and cost. Fill in these fields once with a bulk change or import — then GLPI will update the "hardware" part itself.
Adult inventory: the process#
| Event | Action in GLPI |
|---|---|
| Procurement | create an asset with the status "In Stock," contract, and warranty |
| Issuing the employee | assign a user and location, status "In Operation" |
| Repair | status "Under repair" should be linked to the request |
| Dismissal | request "return equipment," status "In stock" |
| Write-off | status "Written off", act, remove from AD |
Devices without an agent report for more than N days — a reason to check: the computer is shut down, broken, stolen, or the agent is deleted.
💡 If GLPI is too big a step for you and you need accounting right now, check out the AD Inventory editorial pet project: a PowerShell agent collects computer information via GPO into a shared folder, and the report is built as a single HTML file.
Next — SLA, categories, knowledge base, and reports: Helpdesk, part 5: SLA, categories, knowledge base, and reports in GLPI — how to measure support performance.
Comments · 0
No comments yet.Sign in to comment, rate and see all comments.