/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Custom Inventory rule only working CentOS but not Ubuntu

06/14/2019 294 views

I have the a CIF that outputs the list of local linux accounts using this command:

getent passwd {500..10000} | awk -F: '{ print $1}'


From a shell on both CentOS and Ubuntu it outputs the correct info. However when from a custom Inventory rule it only works on CentOS (5.x and up) but not on any Ubuntu system (12 and up)


I'm using this: ShellCommandTextReturn(getent passwd {500..10000} | awk -F: '{ print $1}')

I have also tried with this version: ShellCommandTextReturn(getent passwd {500..10000} | cut -d: -f1)


This is what I see in the Ubuntu KAgent.log file:


[2019-06-14.19:20:16][KDeploy:ExecuteCustomInventoryRu] rule ID [22158] : issuing rule [ShellCommandTextReturn(getent passwd {500..10000} | awk -F: '{ print $1}');]

[2019-06-14.19:20:16][KDeploy:ExecuteCustomInventoryRu] rule [22158] statement result: "", FALSE

[2019-06-14.19:20:16][KDeploy:RunCustomInventory      ] KDeploy    finished processing 3 custominventory rules, sending response


I have other custom inventory items that work fine on both CentOS and Ubuntu.


Any ideas?

1 Comment   [ + ] Show comment

Comments

  • I'm seeing the same behavior, you might want to contact support:

    https://support.quest.com/create-service-request

Be the first to answer this question

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ