Syntax
string getfullname ( string user )
Description
getfullname returns the specified user’s full name from the policy server (or from the client host if getpasswordfromrun is set to yes in the policy server's pm.settings file). When called without arguments, the function reports the full name for the user name present inside the runuser variable.
Example
# print the fullname of root on the policy server
print(getfullname("root"));
Syntax
string getgroup ( string user )
Description
getgroup returns the specified user’s primary group name from the policy server (or from the client host if getpasswordfromrun is set to yes in the policy server's pm.settings file). If no user is specified, it returns the submituser’s primary group.
Example
# print root user's primary group on the policy server
print(getgroup("root"));
Syntax
list getgroups ( string user )
Description
getgroups returns the list of groups to which the specified user belongs from the policy server (or from the client host if getpasswordfromrun is set to yes in the policy server's pm.settings file). If you do not specify a user, it returns the submituser's secondary groups.
The following example returns the list of groups to which root belongs.
Example
# print the list of groups to which root belongs
print(getgroups("root"));
Syntax
string gethome( string user )
Description
gethome returns the specified user’s home directory from the policy server (or from the client host if getpasswordfromrun is set to yes in the policy server's pm.settings file).
Example
# set working directory to root's home dir on the policy server
runcwd = gethome("root");