string getgroup ( string user )
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.
# print root user's primary group on the policy server print(getgroup("root"));
list getgroups ( string user )
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.
# print the list of groups to which root belongs print(getgroups("root"));
string gethome( string user )
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).
# set working directory to root's home dir on the policy server runcwd = gethome("root");
string getshell ( string user )
getshell returns the specified user’s login program from the policy server (or from the client host if getpasswordfromrun is set to yes in the policy server's pm.settings file).
#check the user's shell on the policy server is in /opt/quest/bin shell=getshell(user); if (dirname(shell) != "/opt/quest/bin") { reject "You are only permitted to run a login shell from /opt/quest/bin"; }
© 2021 One Identity LLC. ALL RIGHTS RESERVED. Feedback Conditions d’utilisation Confidentialité