Setting up Linux (using Ubuntu as an example) for remote inventory ------------------------------------------------------------------ 1. Install the necessary components: sudo apt install net-tools ssh 2. Create working folders: sudo mkdir /opt/TNI sudo mkdir /opt/TNI/Send 3. Download the GetInventoryLinux.sh file to the /opt/TNI/ folder sudo wget -q -P /opt/TNI https://prism.akvelon.net:8441/inventory/GetInventoryLinux.sh 4. Set file permissions: sudo chmod 755 /opt/TNI/GetInventoryLinux.sh 5. Allow execution of the script without entering a password: sudo visudo In the document that opens, add the line after #includedir user ALL=NOPASSWD: /opt/TNI/GetInventoryLinux.sh where user is your username. Save the document: CTRL + O Close the editor: CTRL + X 6. We start collecting information: sudo /opt/TNI/GetInventoryLinux.sh 7. Check that the /opt/TNI/Send folder contains the file %Hostname%_%MacAddress%.inv 8. Send a letter with your local IP address to bdc.it@akvelon.com system administrators to confirm its successful operation. 9. Next, you need to add the file to startup or scheduler and check its operation. The solution depends on the frequency of reboots/re-logins in the OS: if you reboot/relogin at least once every 1-2 weeks, then it is preferable to add it to startup (9.1.1., 9.1.2.), otherwise, you need to configure the scheduler (9.2.1., 9.2.2.). If you make the wrong choice, be prepared that you will be periodically asked to run the script manually. ###logon script ### 9.1.1. Add the script to startup: In the graphical interface, click Show Applications Select Startup Applications Preferences Click Add and fill in the fields: Name - TNI_Agent Command - sudo /opt/TNI/GetInventoryLinux.sh Comment - Akvelon inventory Click Add and Close 9.1.2. Reboot, log in to Ubuntu and send a letter with your local IP address to bdc.it@akvelon.com system administrators to confirm its successful operation. ### cron ### 9.2.1. Create a task in the scheduler: crontab –e Add to the end of the file: 0 11 * * 1-5 /opt/TNI/GetInventoryLinux.sh >/dev/null 2>&1 Comment. You can edit the script launch time according to your work schedule, but we must assume that the script runs successfully at least once a week. 9.2.2. Let's reboot. 9.2.3 A week later we send a letter with your local IP address to bdc.it@akvelon.com system administrators to confirm its successful operation.