To edit the Linux platform "init" script, perform these steps:
Go to Administration->Platforms->Linux Click "Edit" to the right of the "init" script (Initialise) Click inside the edit window to make it larger
Change these lines to add the yellow highlighted text like this: OLD:
# dmidecode requires superuser privileges to read data from the system BIOS
PRIV_DMIDECODE() {
"$@"
}
# hwinfo requires superuser privileges to read data from the system BIOS
PRIV_HWINFO() {
"$@"
}
NEW:
# dmidecode requires superuser privileges to read data from the system BIOS
PRIV_DMIDECODE() {
sudo "$@"
}
# hwinfo requires superuser privileges to read data from the system BIOS
PRIV_HWINFO() {
sudo "$@"
}
NOTE 1: It is best to edit this script directly in the edit window. Don't copy/paste from a Windows editor because this can cause problems with using the wrong kinds of double-quotes. (Don't copy/paste from this KA either.) See KA 000148423 for more information.
NOTE 2: In addition to calling the dmidecode and hwinfo commands with "sudo" from the Discovery platform script, these commands must have privileges to run with sudo as the Discovery user. (The sudoers file must allow this on the target system.)
NOTE 3: In one case, the lshal command was present, but not working on one particular server. The issue seemed to be with the messagebus service on the target server. Once the service was restarted, the scan returned the correct serial number (and uuid) information.
NOTE 4: Discovery will look for the 'sudo' command in the default PATH, as defined in the Linux platform script:
/bin:/usr/bin:/sbin:/usr/sbin
If sudo is not present in the default path for some targets, the commands with sudo will not work correctly on those targets. Run "which sudo" on the target to get the correct path, and then update the Path: section with the additional path.
If "which sudo" shows that there are multiple iterations of sudo present, it may be necessary to specify the full path in the PRIV sections, for example:
# dmidecode requires superuser privileges to read data from the system BIOS
PRIV_DMIDECODE() {
/usr/local/bin/sudo "$@"
}
# hwinfo requires superuser privileges to read data from the system BIOS
PRIV_HWINFO() {
/usr/local/bin/sudo "$@"
}