<def-group>
  <definition class="compliance" id="no_shelllogin_for_systemaccounts" version="1">
    <metadata>
      <title>System Accounts Do Not Run a Shell</title>
      <affected family="unix">
        <platform>multi_platform_all</platform>
      </affected>
      <description>The root account is the only system account that should have a login shell.</description>
      <reference source="swells" ref_id="20130918" ref_url="test_attestation" />
    </metadata>
    <criteria>
      <criterion comment="tests for the presence of login shells (not /sbin/nologin) for system accounts in /etc/passwd file" test_ref="test_no_shelllogin_for_systemaccounts" />
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" check_existence="none_exist" comment="tests for the presence of login shells (not /sbin/nologin) for system accounts in /etc/passwd file" id="test_no_shelllogin_for_systemaccounts" version="1">
    <ind:object object_ref="object_no_shelllogin_for_systemaccounts" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_no_shelllogin_for_systemaccounts" version="1">
    <ind:filepath>/etc/passwd</ind:filepath>
    <ind:pattern operation="pattern match">^(?!root).*:x:0*([0-9]{1,2}|[1-4][0-9]{2}):[\d]*:[^:]*:[^:]*:(?!\/sbin\/nologin|\/bin\/sync|\/sbin\/shutdown|\/sbin\/halt).*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
