1 Reply Latest reply on May 26, 2007 11:21 AM by Andrew Knott

    Help please, need correct sybnax in rule definition

      Hi all,

      I'm newbie in Bladelogic an my english is terrible, sorry ...

      I need a rule that discover in the Extended Object Users, all Normal User.

      How I can skip the root account?

       

      I've tried:

       

      Extended Object Entry Users//(!="root")/type Must Exist AND (Value1 as String = "Normal")

       

      Extended Object Entry Users//!="root"/type Must Exist AND (Value1 as String = "Normal")

       

      Extended Object Entry Users//*(!="root")/type Must Exist AND (Value1 as String = "Normal")

       

      Tanks in advance

       

      --

      Ilario

        • 1. Re: Help please, need correct sybnax in rule definition

          You may not be able to do it that way, if you change the extended object you can create a rule that will work.

           

           

           

          In the config object dictionary, copy the "Users" extended object to "Users 2". Change the command to run .../share/users2.blq and change the grammar to csv.

           

          On the application server, copy .../share/users.blq to users2.blq and change the print statement:

           


          user_record_count ('

          printf ("\n%s,%s,%s,%s,%s,%s\n",
          NAME, NAME,
          if (user_type (NAME) = BUA_ADMIN_ACCOUNT, "Admin",
          if (user_type (NAME) = BUA_GUEST_ACCOUNT, "Guest", "Normal")),
          if ((user_status (NAME) & BUA_PWD_NO_EXPIRE) = BUA_PWD_NO_EXPIRE, "TRUE", "FALSE"),
          if (user_locked (NAME), "TRUE", "FALSE"),
          if (user_disabled (NAME), "TRUE", "FALSE"),
          user_group_names (NAME, ",")
          )
          ');

           

           

          Create a component template, add the "Users 2" extended object as a part and create this rule:

           

          Extended Object Entry "Users 2//*" Must Exist
          AND
          ((Value1 as String = "root")
          OR
          (Value2 as String = "Normal"))

           

           

          You can create the rule by selecting "At least ONE object must exist ..." along with the "Match ANY of the following options".