getuid

Prototype: getuid(username)

Return type: int

Description: Return the integer user id of the named user on this host

If the named user is not registered the variable will not be defined.

Arguments:

  • username : User name in text, in the range .*

Example:

    bundle agent example
    {
    vars:

      "uid" int => getuid("mark");

    reports:
      "Users uid is $(uid)";
    }

Notes: On Windows, which does not support user ids, the variable will not be defined.