Chat now with support
Chat with Support

Safeguard for Sudo 2.0 - Administrators Guide

One Identity Privileged Access Suite for Unix Introducing Privilege Manager for Unix Introducing Privilege Manager for Sudo Planning Deployment Installation and Configuration
Download Privilege Manager for Unix Software Packages Download Privilege Manager for Sudo Software Packages Quick Start and Evaluation Configure a Primary Policy Server Configure a Secondary Policy Server Install PM Agent or Sudo Plugin on a Remote Host Remove Configurations
Upgrading Privilege Manager System Administration Managing Security Policy The Privilege Manager for Unix Security Policy Advanced Privilege Manager for Unix Configuration Administering Log and Keystroke Files InTrust Plug-in for Privilege Manager Troubleshooting Privilege Manager for Unix Policy File Components Privilege Manager Variables Privilege Manager for Unix Flow Control Statements Privilege Manager for Unix Built-in Functions and Procedures Privilege Manager Programs Installation Packages Unsupported Sudo Options Sudo Plugin Policy Evaluation About us

pmshell_exe

Description

Type integer READONLY

pmshell_exe contains a constant value that identifies a normal executable command. Use it to compare with the value of the pmshell_cmdtype variable.

Example
if (defined pmshell_cmd){ 
   if (pmshell_cmdtype == pmshell_exe) 
   { 
      if (basename(runcommand) in shell_sub_list) { 
         accept; 
      } 
   } 
}

pmshell_interpreter

Description

Type integer READONLY

pmshell_interpreter is only defined if the command is running from within a Privilege Manager shell program. If the shell subcommand is an interpreted script (that is, the first line of the file contains a directive in the format #!<path>) then this variable contains the pathname of the interpreter identified by this directive. Use this variable to detect and reject a user from running an unrestricted shell script from within a restricted shell program.

Example
if (defined pmshell) 
{ 
   printf("Starting %s shell\n", pmshell_prog); 
   accept; 
} 
if ((defined pmshell_cmd) && (pmshell_cmd == true)) 
{ 
   # if running a restricted shell, then don't allow the user to run a shell 
   # script unless it's a Privilege Manager shell 
   if (pmshell_restricted && (pmshell_cmdtype == pmshell_script)) 
   { 
      if (dirname(pmshell_interpreter) != "/opt/quest/bin") 
      { 
         reject "Restricted shell only permits you to run a shell in the 
					/opt/quest/bin directory"; 
      } 
   }

pmshell_prog

Description

Type string READONLY

pmshell_prog is only defined if a Privilege Manager shell program is running. If a shell is running, it is set to the name of the shell program (pmsh, pmcsh, pmksh, or pmloginshell).

Example
if (defined pmshell) 
{ 
   printf("Starting %s shell\n", pmshell_prog); 
   accept; 
}

pmshell_script

Description

Type integer READONLY

pmshell_script is a constant value that identifies a shell script. Use it for comparison with the value of the pmshell_cmdtype variable.

Example
if (defined pmshell_cmd && (pmshell_cmdtype == pmshell_script)) 
{ 
   #forbid any shell scripts unless interpreter is a program in /opt/quest/bin 
   if (dirname (pmshell_interpreter) != "/opt/quest/bin")) 
   { 
      reject "You cannot run this script"; 
   } 
}
Related Documents