立即与支持人员聊天
与支持团队交流

Privilege Manager for Unix 7.2.1 - Administration Guide

Introducing Privilege Manager for Unix Planning Deployment Installation and Configuration Upgrade Privilege Manager for Unix 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 for Unix Troubleshooting Privilege Manager for Unix Policy File Components Privilege Manager for Unix Variables
Variable names Variable scope Global input variables Global output variables Global event log variables PM settings variables
Privilege Manager for Unix Flow Control Statements Privilege Manager for Unix Built-in Functions and Procedures
Environment functions Hash table functions Input and output functions LDAP functions LDAP API example List functions Miscellaneous functions Password functions Remote access functions String functions User information functions Authentication Services functions
Privilege Manager for Unix programs Installation Packages

getuserpasswd

Syntax
int getuserpasswd ( int user [, string prompt] [, int attempts] )
Description

getuserpasswd prompts the specified user for a password. You can specify an optional prompt, which defaults to "Password:". And you can specify the number of attempts to allow; the default is 3.

By default, this function authenticates the user on the policy server. Set the value of getpasswordfromrun in pm.settings to yes to authenticate the user on the client instead.

Returns true if the user enters the correct codeword; otherwise false.

Example
if (getuserpasswd("admin", "Password: ", 1) == false ) { 
   reject; 
}

Remote access functions

These are the built-in remote access functions available to use within the pmpolicy file.

Table 44: Remote access functions
Name Description
remotefileexists Check a file exists on a host.
remotegroupinfo Check if a group exists on a host.
remotegrouplist Get a list of groups from a host.
remotesysinfo Get the uname information from a host.
remoteusergroups Get a list of a user’s groups on a host.
remoteuserinfo Get a user’s information from a host.

remoteuserlist

Get a list of users on a host.

remotefileexists

Syntax
int remotefileexists ( string hostname, string filename )
Description

The remotefileexists function checks whether a filename exists on the remote system hostname.

Returns true if the file exists; otherwise, it returns false.

The remote host must be configured to run either pmmasterd or pmclientd to respond to this function.

Example
print(remotefileexists(runhost,"/etc/passwd"))

remotegroupinfo

Syntax
list remotegroupinfo ( string hostname, string groupname )
Description

remotegroupinfo returns the group ID and a list of members of the specified group from the remote host.

The remote host must be configured to run either pmmasterd or pmclientd to respond to this function.

Example
#print the bin group info from the runhost 
print(remoteuserinfo(runhost,"bin")) 
Related Topics

remoteuserinfo

remotesysinfo

相关文档

The document was helpful.

选择评级

I easily found the information I needed.

选择评级