<def-group>
  <definition class="compliance" id="audit_rules_usergroup_modification" version="1">
    {{{ oval_metadata("Audit rules should detect modification to system files that hold information about users and groups.") }}}
    <criteria operator="OR">
      <criteria operator="AND">
        <extend_definition comment="audit augenrules" definition_ref="audit_rules_augenrules" />
	<criterion comment="audit /etc/group" test_ref="test_audit_rules_usergroup_modification_etc_group_augen" />
	<criterion comment="audit /etc/passwd" test_ref="test_audit_rules_usergroup_modification_etc_passwd_augen" />
	<criterion comment="audit /etc/gshadow" test_ref="test_audit_rules_usergroup_modification_etc_gshadow_augen" />
	<criterion comment="audit /etc/shadow" test_ref="test_audit_rules_usergroup_modification_etc_shadow_augen" />
	<criterion comment="audit /etc/security/opasswd" test_ref="test_audit_rules_usergroup_modification_etc_security_opasswd_augen" />
      </criteria>
      <criteria operator="AND">
        <extend_definition comment="audit auditctl" definition_ref="audit_rules_auditctl" />
        <criterion comment="audit /etc/group" test_ref="test_audit_rules_usergroup_modification_etc_group_auditctl" />
        <criterion comment="audit /etc/passwd" test_ref="test_audit_rules_usergroup_modification_etc_passwd_auditctl" />
        <criterion comment="audit /etc/gshadow" test_ref="test_audit_rules_usergroup_modification_etc_gshadow_auditctl" />
        <criterion comment="audit /etc/shadow" test_ref="test_audit_rules_usergroup_modification_etc_shadow_auditctl" />
        <criterion comment="audit /etc/security/opasswd" test_ref="test_audit_rules_usergroup_modification_etc_security_opasswd_auditctl" />
      </criteria>
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" comment="audit augenrules /etc/group" id="test_audit_rules_usergroup_modification_etc_group_augen" version="1">
    <ind:object object_ref="object_audit_rules_usergroup_modification_etc_group_augen" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_audit_rules_usergroup_modification_etc_group_augen" version="1">
    <ind:filepath operation="pattern match">^/etc/audit/rules\.d/.*\.rules$</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/group[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" comment="audit augenrules /etc/passwd" id="test_audit_rules_usergroup_modification_etc_passwd_augen" version="1">
    <ind:object object_ref="object_audit_rules_usergroup_modification_etc_passwd_augen" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_audit_rules_usergroup_modification_etc_passwd_augen" version="1">
    <ind:filepath operation="pattern match">^/etc/audit/rules\.d/.*\.rules$</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/passwd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" comment="audit augenrules /etc/gshadow" id="test_audit_rules_usergroup_modification_etc_gshadow_augen" version="1">
    <ind:object object_ref="object_audit_rules_usergroup_modification_etc_gshadow_augen" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_audit_rules_usergroup_modification_etc_gshadow_augen" version="1">
    <ind:filepath operation="pattern match">^/etc/audit/rules\.d/.*\.rules$</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/gshadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" comment="audit augenrules /etc/shadow" id="test_audit_rules_usergroup_modification_etc_shadow_augen" version="1">
    <ind:object object_ref="object_audit_rules_usergroup_modification_etc_shadow_augen" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_audit_rules_usergroup_modification_etc_shadow_augen" version="1">
    <ind:filepath operation="pattern match">^/etc/audit/rules\.d/.*\.rules$</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/shadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" comment="audit augenrules /etc/security/opasswd" id="test_audit_rules_usergroup_modification_etc_security_opasswd_augen" version="1">
    <ind:object object_ref="object_audit_rules_usergroup_modification_etc_security_opasswd_augen" />
  </ind:textfilecontent54_test>  <ind:textfilecontent54_object id="object_audit_rules_usergroup_modification_etc_security_opasswd_augen" version="1">
    <ind:filepath operation="pattern match">^/etc/audit/rules\.d/.*\.rules$</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/security/opasswd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" comment="audit /etc/group" id="test_audit_rules_usergroup_modification_etc_group_auditctl" version="1">
    <ind:object object_ref="object_audit_rules_usergroup_modification_etc_group_auditctl" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_audit_rules_usergroup_modification_etc_group_auditctl" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/group[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" comment="audit /etc/passwd" id="test_audit_rules_usergroup_modification_etc_passwd_auditctl" version="1">
    <ind:object object_ref="object_audit_rules_usergroup_modification_etc_passwd_auditctl" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_audit_rules_usergroup_modification_etc_passwd_auditctl" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/passwd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" comment="audit /etc/gshadow" id="test_audit_rules_usergroup_modification_etc_gshadow_auditctl" version="1">
    <ind:object object_ref="object_audit_rules_usergroup_modification_etc_gshadow_auditctl" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_audit_rules_usergroup_modification_etc_gshadow_auditctl" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/gshadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" comment="audit /etc/shadow" id="test_audit_rules_usergroup_modification_etc_shadow_auditctl" version="1">
    <ind:object object_ref="object_audit_rules_usergroup_modification_etc_shadow_auditctl" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_audit_rules_usergroup_modification_etc_shadow_auditctl" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/shadow[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" comment="audit /etc/security/opasswd" id="test_audit_rules_usergroup_modification_etc_security_opasswd_auditctl" version="1">
    <ind:object object_ref="object_audit_rules_usergroup_modification_etc_security_opasswd_auditctl" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_audit_rules_usergroup_modification_etc_security_opasswd_auditctl" version="1">
    <ind:filepath>/etc/audit/audit.rules</ind:filepath>
    <ind:pattern operation="pattern match">^\-w[\s]+/etc/security/opasswd[\s]+\-p[\s]+\b([rx]*w[rx]*a[rx]*|[rx]*a[rx]*w[rx]*)\b.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
