Table of Contents
getuid
Table of Contents
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
:string
- User name in text - in the range:.*
Example:
body common control
{
bundlesequence => { "example" };
}
bundle agent example
{
vars:
"uid" int => getuid("root");
reports:
"root's uid is $(uid)";
}
Output:
R: root's uid is 0
Notes: On Windows, which does not support user ids, the variable will not be defined.