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

osname

Syntax
string osname( )
Description

osname returns an internal string representation of the operating system on the policy server, such as aix43-rs6k, linux-x86_64.

Example
printf("Policy server is running on OS:%s\n", osname()); 

quote

Syntax
string quote( string str [, string esc] )
Description

The quote function puts the specified string between quotation marks. It inserts the "\" (backslash) character as required to "quote" any occurrences of the characters in the second argument to indicate that they are taken literally. Useful when parsing arguments into commands which are shell scripts. The default escape character is a single quote.

Example
#this function will return: "This won\'t fail." 
quote("This won't fail.", "'");

rand

Syntax
int rand(int max )
Description

rand returns a random number less than the specified maximum.

Example
# print a random item from a list 
print(alist[rand(length(alist)]);

stat

Syntax
list stat ( string fn )
Description

stat returns information about a specified file on the policy server.

If the file fn exists on the policy server, stat returns the following list of values:

  • File size in bytes
  • File owner as username
  • File group as groupname
  • File permissions as octal
  • File change date in the format: YYYY/MM/DD
  • File change time in the format: HH:MM:SS
  • File change time in the format: seconds since the epoch
  • File access date in the format: YYYY/MM/DD
  • File access time in the format: HH:MM:SS
  • File access time in the format: seconds since the epoch
  • File modification date in the format: YYYY/MM/DD
  • File modification time in the format: HH:MM:SS
  • File modification time in the format: seconds since the epoch
  • File inode number
Related Documents