Frequently asked questions about managing users from policy.

How do I ensure that a local user is locked?

To ensure that a local user exists but is locked (for example a service account) simply specify policy => "locked".

code
bundle agent service_accounts
{
  vars:
      "users" slist => { "apache", "libuuid" };

  users:
    !windows::
      "$(users)"
        policy => "locked";
}