[ -z on|off[:<pid>] ][ -v ]| [ [ -ars ] [ -e <logfile> ] ]
The Privilege Manager master daemon (pmmasterd) is the policy server decision-maker. pmmasterd receives requests from pmrun or the Sudo Plugin and evaluates them according to the security policy. If the request is accepted, pmmasterd asks pmlocald or the Sudo Plugin to run the request in a controlled account such as root.
A connection is maintained between pmmasterd and the Sudo Plugin for the duration of the session. This also occurs between pmmasterd and pmlocald, if keystroke logging is enabled. When the pmmasterd connection is maintained throughout the session, keystroke and event log data is forwarded on this connection.
If keystroke logging is not enabled, pmlocald reconnects to pmmasterd at the end of the session to write the event log record showing the final completion code for the command run by pmlocald. If pmlocald is unable to reconnect, it writes instead to a holding file, pm.eventhold.hostname. It then attempts to write the pmevents.db record to the host the next time pmmasterd connects to pmlocald. Multiple files can accrue and they will all be delivered to the proper host when the connection is restored.
The policy server master daemon typically resides on a secure machine. You can have more than one policy server master daemon on different hosts for redundancy or to serve multiple networks.
pmmasterd logs all errors in a log file if you specify the -e filename option.
pmmasterd has the following options.
|-a||Sends job acceptance messages to syslog.|
|-e <filename>||Logs any policy server master daemon errors in the file specified.|
|-r||Sends job rejection messages to syslog.|
|-s||Sends any policy server master daemon errors to syslog.|
|-v||Displays the version number of pmmasterd and exits.|
Enables or disables tracing for this program and optionally for a currently running process.
Refer to Enabling program-level tracing before using this option.
The pmmg text editor is a special version of the mg text editor that you can use securely with Privilege Manager programs; it is a small version of gnu emacs with gnu-style emacs key bindings. You must specify a full pathname as an argument when starting pmmg. Also, you will not be able to access any files other than the ones you specified at startup time. Nor will you be allowed to spawn any processes.
When you the pmmg program with Privilege Manager, it allows you to access a specific file as root, but not other root functions.
The pmpasswd program generates an encrypted password which can be used in a custom configuration script. When you type pmpasswd, it asks you to type the password twice, then prints out the encrypted version. You can use the encrypted version as the first argument to the getstringpasswd function in the configuration file.
| -z on|off[:<pid>]command [args] [-c] [<command>.] -h
pmpolicy is a command line utility for managing the Privilege Manager for Unix security policy. Use the pmpolicy command to view and edit the policy in use by the group. Any user in the pmpolicy group may run this command on any configured policy server host.
This utility checks out the current version, checks in an updated version, and reports on the repository.
You can use the –c option to display the result of the command in CSV, rather than in a human-readable form. The CVS output displays the following fields: Resultcode, name, description, Output msg.
The pmpolicy utility exits with the following possible exit status codes, unless otherwise stated below:
The following is a summary of the commands and options available to pmpolicy.
NOTE: Run any command with a -h to get more information about it. For example:
pmpolicy <command> -h
|add||Adds a new file from the specified path to the policy repository. |
add -p path -d dir [-n [-l commitmsg]] [-c] [-u <user>]
Records the addition of a new file to the working copy of the policy. Use the -p option to specify the file path (relative to the top-level directory in the policy) to add. Use the -d option to specify the directory of the working copy. The -n option commits the changes to the repository. If you use the -n option, you can also use the -l option to provide a commit log message. If you use -n without the -l, the command interactively prompts you for the commit log message
|checkout||Checks out a working copy of the policy to the specified directory. |
checkout -d <dir> [-c] [-r <revision>]
If the directory does not exist, it is created. If the selected directory exists, the existing contents is overwritten. By default, the latest copy is retrieved; use the –r option to check out a particular revision. You can specify a revision using SVN DATE format, or the HEAD keyword, as well as revision numbers.
|commit||Checks in changes from a working copy to the policy repository. |
commit -d <dir> [-l <commitmsg>] [-c] [-a force|abort|merge|overwrite][-u <user>]
Commits the working copy of the policy from the indicated directory. All files in the indicated directory are checked in to the repository.
This working copy is first verified for syntax errors using the pmcheck utility. The working copy must match the policy type currently in use, otherwise a syntax error will be produced by pmcheck.
If no syntax errors are encountered, it attempts to check in this copy into the repository, honoring the -a option as described below. Exit status of 0 indicates successful check in.
The –a option indicates the action to be taken when checking in a working copy, if the repository has changed since the working copy was checked out, that is, the edits are based on an out-of-date copy of the repository. The resulting differences between the working copy and the repository may or may not conflict.
You can specify the following actions:
pmpolicy commit -d /tmp -a force
|diff||Checks the differences between two revisions of the policy and reports the output to stdout, or to the selected output file. |
diff [-o <outfile>][-c][-f][-p <path>][-d <dir> [-r <v1>]] | [-r [<v1>:[<v2>]]
By default, this option displays the differences between the two selected revisions. If you specify the –f option, it displays the incremental differences between each revision in the specified range. You can specify revisions using any acceptable SVN revision format, such as HEAD, COMMITTED, or DATE format. You can use the –o option to report the "diff" output to a file, rather than to stdout (the default).
Exit status codes:
pmpolicy diff -d /tmp -o /tmp/diffs.txt -r2 pmpolicy diff –r1:2 -o /tmp/diffs.txt
The utility checks out a temporary working copy of the policy and starts the appropriate interactive editor to edit the files.
edit [-a force|abort|merge|overwrite] [-l <commitmsg>] [-p <path>][-u <user>]
This option is useful for manual interactive editing of the policy on the command line.
On completion of the edit, it verifies the syntax of the policy. If no errors are found, it checks the edits back in to the repository. If any errors are found, then it exits without checking in the changes.
|help||Displays usage information.|
|log||Logs revision information about the repository. |
log [-o <outfile>][-c][-e][-r <revision>]
Reports information about the repository to stdout or to the selected output file. This displays details of the user who changed the repository, the version number for this change, along with the time and date of the change.
By default, this option shows details of each revision in the repository, one version per line. If you specify a version, it shows the details of this version. You can use the –o option to report the "log" output to a file, rather than to stdout.
The status is displayed in the following format for CSV output:
pmpolicy log -r 3
|masterstatus||Reports the status of the production copy of the policy used by Privilege Manager for Unix to authorize commands. |
masterstatus [-o <outfile>] [-c]
The production copy is stored in the following directory by default:
You can use the –o option to report the information to a file instead of to stdout.
It reports the following information:
The information is displayed in the following format for CSV output:
Removes a file from the specified path in the policy repository.
remove -p path -d dir [-n [-l <commitmsg>]] [-c] [-u <user>]
Removes a file from the indicated working copy directory. Use the -p option to specify a path to the file (relative to the top-level directory in the policy). Use the -d option to specify the directory of the working copy. The -n option commits the changes to the repository. If you use the -n option, you can also use the -l option to provide a commit log message. If you use -n without -l, the command interactively prompts you for the commit log message.
|revert||Reverts to the selected revision of the policy.|
revert [-c] [-r <version>][-l <commitmsg>]
Checks out a copy of the selected revision, edits the files, and checks the copy back in as the latest revision.
|status||Verifies the working copy of the policy in the directory indicated. |
status -d <dir> [-c]
Verifies the working copy of the policy in the specified directory. You can use this to verify the status of a working copy that was previously checked out, before attempting to commit any edits. Each file in the selected directory is checked against the latest version in the repository. For example:
pmpolicy status -d /tmp
Exit status codes:
|sync||Checks out the latest version to the production copy of the policy used by Privilege Manager for Unix to authorize commands. |
Synchronize the local production copy of the policy with the latest revision in the repository.
|-v||Displays the Privilege Manager version.|
Enables or disables debug tracing and optionally sends SIGHUP to a running process.
Refer to Enabling program-level tracing before using this option.