Serial Number on Linux Server with ACC

SK Chand Basha
Giga Sage

Hello Everyone!

 

The serial number is not being populated with agent client collector,  I’ve installed dmidecode using the following commands in amazon linux 2023

 

sudo yum install dmidecode

sudo dmidecode -s system-serial-number

 

Do we need to configure any permissions after the dmicode installation?

 

 

1 ACCEPTED SOLUTION

SK Chand Basha
Giga Sage

To retrive the serial number we have to add the servicenow user to sudoers file. 

 

Command : sudo visudo -f /etc/sudoers.d/servicenow

 

After run the above command file will be opened

 

Command : servicenow ALL=(ALL) NOPASSWD: /usr/sbin/dmidecode, /usr/sbin/ss
 
After entering the command, check the bottom to view the shortcuts.
 
First exit and it will ask to save the file Press Y and hit Enter
 
 . Log In as the User: After ensuring the user exists and is properly configured, you can switch to the user:
Command : sudo su - servicenow
 
Expected Result : Empty value
 
Command : sudo /usr/sbin/dmidecode
 
Here we can see Serial number
 
Restart the Mid server and ACC Service  
 
Command : systemctl list-unit-files --type service -all
 
Expected Result:
 
Shows List of services
 
Command : sudo systemctl restart (type_Servicename)
 
 

View solution in original post

2 REPLIES 2

Severin Launiau
Giga Guru

@SK Chand Basha: to retrieve the serial number on a Linux system, you need root or sudo privileges. ACC does use dmidecode to extract the serial number, so you need to add dmidecode to sudo for the user running the agent. See the ACC installation documentation for more details.

SK Chand Basha
Giga Sage

To retrive the serial number we have to add the servicenow user to sudoers file. 

 

Command : sudo visudo -f /etc/sudoers.d/servicenow

 

After run the above command file will be opened

 

Command : servicenow ALL=(ALL) NOPASSWD: /usr/sbin/dmidecode, /usr/sbin/ss
 
After entering the command, check the bottom to view the shortcuts.
 
First exit and it will ask to save the file Press Y and hit Enter
 
 . Log In as the User: After ensuring the user exists and is properly configured, you can switch to the user:
Command : sudo su - servicenow
 
Expected Result : Empty value
 
Command : sudo /usr/sbin/dmidecode
 
Here we can see Serial number
 
Restart the Mid server and ACC Service  
 
Command : systemctl list-unit-files --type service -all
 
Expected Result:
 
Shows List of services
 
Command : sudo systemctl restart (type_Servicename)