Error - sudo: dmidecode: command not found

RajeshGummadoju
Tera Contributor

Serial Number information is missing for some of Linux Servers.

Error - sudo: dmidecode: command not found

we have tried runing  sudo /usr/sbin/dmidecode -t 1 | cat and getting results.

However the same OOB command(sudo dmidecode -t 1 | cat) is working fine for other Linux Servers.

We have tried using mid property mid.ssh.disable_privilege_check parameter but still facing the same issue.

Please let me know your thoughts, thanks in advance.

Best Regards,

RajeSh

5 REPLIES 5

tim_broberg
ServiceNow Employee
ServiceNow Employee

mid.ssh.disable_privilege check: It sounds like the problem is not that sudo is failing, but that dmidecode is just missing on these servers.

Can you install dmidecode?
    - Tim.

Hi Tim,

Thanks for your reply.

But when we are running command sudo /usr/sbin/dmidecode -t 1 | cat instead of sudo dmidecode -t 1 | cat we are getting output.

If dmidecode is not installed that shouldn't return any output right.

Please let me know if we are missing something.

Best Regards,

RajeSh

Most likely this's happened due to credentials supplied. Executable programs in /sbin directory by default not in the PATH file for ordinary users. If you cannot run  "sudo dmidecode -t 1 | cat" but can run "sudo /usr/sbin/dmidecode -t 1 | cat"  on a Linux machine, try to add a variable to PATH file and rerun command. 

Hope this helps.

Interesting. Perhaps you have two copies and the first one on the path is not in sudoers?

What happens if you run which dmidecode?