Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 709 Bytes

getuid.markdown

File metadata and controls

37 lines (27 loc) · 709 Bytes
layout title categories published alias tags
default
getuid
Reference
Functions
getuid
true
reference-functions-getuid.html
reference
system functions
functions
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.