Syntax
list remoteuserinfo ( string hostname, string username )
Description
remoteuserinfo returns user information for the specified user from the remote host.
The remote host must be configured to run either pmmasterd or pmclientd to respond to this function.
Example
#print root's info on the runhost
print( remoteuserinfo(runhost,"root") )
Syntax
list remoteuserlist ( string hostname )
Description
remoteuserlist returns the full list of user names on the remote host.
The remote host must be configured to run either pmmasterd or pmclientd to respond to this function.
Example
#print the user list on the runhost
print(remoteuserlist(runhost))
These are the built-in string functions available to use within the pmpolicy file.
Table 45: String functions
match |
Match a string to a pattern. |
pad |
Return a new string at a specified character length. |
strindex |
Return the position of a substring in a string. |
strlen |
Return the length of a string. |
strsub |
Return a substring of a string. |
sub |
Return a new string with specified replacements. |
subst |
Substitute part of a string. |
substr |
Return a substring of a string . |
Syntax
int match( string regularexpr, string str )
Description
match compares a string to a regular expression.
Returns true if a match is found; otherwise, false.
Example
# check if user begins with j and ends with t…
if (match("^j.*t$", user) ) {
…
}