New PowerBroker for Unix and Linux Admin Guides · 2020. 5. 18. · Telephone 14 Online 14 Overview...

386
PowerBroker for Unix & Linux System Administration Guide for: PowerBroker for Unix & Linux PowerBroker for Networks PowerBroker for Sudo PowerBroker Essentials

Transcript of New PowerBroker for Unix and Linux Admin Guides · 2020. 5. 18. · Telephone 14 Online 14 Overview...

  • PowerBroker for Unix & Linux

    System Administration Guide for:PowerBroker for Unix & LinuxPowerBroker for NetworksPowerBroker for SudoPowerBroker Essentials

  • Revision/Update Information: Dec 2018Software Version: PowerBroker for Unix & Linux 10.1.0Revision Number: 0

    CORPORATE HEADQUARTERS5090 N. 40th StreetPhoenix, AZ 85018Phone: 1 818-575-4000

    COPYRIGHT NOTICECopyright © 2018 BeyondTrust Software, Inc. All rights reserved.The information contained in this document is subject to change without notice.

    No part of this document may be photocopied, reproduced or copied or translated in any manner to anotherlanguage without the prior written consent of BeyondTrust Software.

    BeyondTrust Software is not liable for errors contained herein or for any direct, indirect, special, incidental orconsequential damages, including lost profit or lost data, whether based on warranty, contract, tort, or any otherlegal theory in connection with the furnishing, performance, or use of this material.

    All brand names and product names used in this document are trademarks, registered trademarks, or trade namesof their respective holders. BeyondTrust Software is not associated with any other vendors or products mentionedin this document.

  • Contents

    Introduction 11

    PowerBroker for Unix & Linux Features 11Conventions Used in This Guide 13

    Font Conventions 13Linespacing Conventions 13

    Where to Go Next? 13Documentation for PowerBroker for Unix & Linux 13Sample Policy Files 14

    14Contacting Support 14

    Telephone 14Online 14

    Overview 15

    PowerBroker for Unix & Linux Task Requests 15Secured Task Submission to SSH-Managed Devices - pbssh 15Secured Task Submission - pbrun 15Policy File Processing - pbmasterd 15Task Execution - pblocald 16Logging - pblogd 16Logging - Message Router (pblighttpd-svc) 16

    Step-by-Step Task Processing 16Local Daemon Started (Normal Mode) 19Log Daemon Started (All Modes) 19

    Normal Mode Processing 21Optimized Run Mode Processing 21

    Optimized Run Mode Availability 22Local Mode Processing 22

    Local Mode Availability 23Local Mode Effects 23Local Mode Limitations 23

    PowerBroker Virtualization 24How PowerBroker Virtualization Works 24PowerBroker Virtualization Features 24

    PowerBroker for Unix & Linux and PowerBroker Identity Services 25Integration Process 26

    PowerBroker for Unix & Linux and BeyondInsight Console 26Integration Process 27

    Solr Indexing and Search 28I/O Log Close Action 29Splunk Integration 29REST API PowerBroker for Unix & Linux 31PowerBroker for Sudo 32

    PowerBroker for Sudo Architecture 32PowerBroker Sudo Policy Server 33PowerBroker Sudo 35

    Contents

    System Administration Guide iii © 2018. BeyondTrust Software, Inc.

  • Log Server for PowerBroker Sudo 36Central Management of Sudoers Policies on PowerBroker Sudo Policy Server 37Host Aliases 37

    Multi-Byte Character Set Support 39PAM to RADIUS Authentication Module 39PowerBroker for Unix & Linux Component, Directory, and File Locations 41

    Settings 43

    Client and Server Programs 43Configuration and Settings database 43

    Database Settings 45Client Registration 46clntregdb 46Example Client Registration Procedure 47

    Role Based Policy 47Database Schema 47Role Based Policy, Change Management Events 52Role Based Policy Entitlement Reports 53pbrun Options 53

    Settings and Configuration Policy File Names 62File Locations 62Host and Port Specifications 65

    Port Specifications 65Host Specifications 65

    Submitting Task Requests to a Policy Server Daemon 67Policy Server Connection Settings 67

    Receiving Task Requests from a Policy Server Daemon 70Failover 72

    Fine Tuning Policy Server and Failover Connection Timing 72Fine Tuning Log Servers and Failover Connection Timing 73Acknowledging Failovers 75

    Policy Server Host Connections to pblocald 76Connections to SSH-Managed Devices 77Connections to Log Servers 79

    logport 80Host Name Verification 81Controlling Connections 83Port Usage 85

    TCP/IP Ports 86Unix/Linux Domain Sockets 88

    Auditing and Logging 88Authorization Event Logging 89Audit Events 91Message Router 92Change Management Events 94License Events 95File Integrity Monitor Events 95Advanced Keystroke Action 96Session Logging 97

    Contents

    System Administration Guide iv © 2018. BeyondTrust Software, Inc.

  • I/O Logging 98I/O Log Indexing and Searching 98PowerBroker Identity Services Event Logging 103BeyondInsight Event Logging 105BeyondInsight Event and I/O Logging Common Settings 113Event Queueing of Integrated Products 115Log Synchronization 116Diagnostic Logging 118

    I/O Log Action 121Log Archiving 123Log Filename Cache 126Network Traffic and File Encryption 127

    Enhanced Encryption 128Using Client Registration 128Without using Client Registration 130Setting the encryption algorithm and key 131

    Pluggable Authentication Modules 141Secure Socket Layers and Public Key Infrastructure 145

    Server-Side SSL 147SSL Client Settings 147SSL Server Settings 150

    Kerberos Version 5 153keytabencryption 154

    PowerBroker for Unix & Linux Shared Libraries 156Shared Libraries for Kerberos 156Shared Libraries for SSL 157Shared Libraries for LDAP 159Shared Library Directory Location for AIX and HP (PA RISC) 160Shared Library File Name for AIX 160Hardware Security Module (HSM) 161

    GUI Configuration 162Other Security Issues 162Licensing 166

    pblicenserefresh 167pblicenseretireafter 168licensehistory 168licenseservers 169licensestatsdb 169licensestatswq 169licensestatswqnum 170pblicensedblocktimeout 170pblicensequeuetimeouts 170

    REST Services 171pbresturi 171pbrestlog 171pbrestdir 171pbrestkeyfile 172pbresttimeout 172pbrestport 172

    Contents

    System Administration Guide v © 2018. BeyondTrust Software, Inc.

  • pbresttimeskew 172Scheduling Service 173

    schedulingservice 173schedulingservicedb 173

    Sudo Integration 173pbsudorefresh 175pbsudofailovertimeout 176

    File Integrity Monitoring 176fileintegritydb 176fileintegritydblocktimeout 176fileintegrityevents 177

    Solaris Projects 177Daemon Mode 180

    daemonfork 180pidfilepath 180

    Reporting 180replaytimeformat 180

    Managing and Testing System Configuration 183

    pbbench 183Output Explanation 192

    pbcheck 192Entitlement Reporting 192

    License Management 194

    Client Limit Enforcement 196Command Line Management 196

    License Management 197Listing Clients 197License Settings 198

    Registry Name Service and Database Synchronization 199

    Service Groups and Planning 199Command Line Configuration 201Settings and Configuration 203

    Prerequisites 203registrynameservice 203servicedb 204svccachedb 204svccacherefresh 204

    Primary Registry Name Server configuration 204Routine configuration examples 207

    Synchronizing PBUL Policy Configuration and other Configuration Files 210Synchronizing PBUL REST appkeys 210Database Synchronization 211

    dbsyncdb 211dbsyncrefresh 211dbsyncloginterval 211

    Contents

    System Administration Guide vi © 2018. BeyondTrust Software, Inc.

  • Troubleshooting Registry Name Service and Database Synchronization issues 212Check the IP addresses and list of Service Groups 213

    Logging 216

    Event Logs 216Example of Event Log Entries 216Reading Verbose Event Log Entries 216Accept/Reject Logging 223Keystroke Action Events 223Reporting and Data Extraction 223Merging Multiple Event Logs 224Advanced Reporting 224Event Log Rotation 224

    I/O Logs 225Displaying I/O Logs 227

    Diagnostic Logging 227Debug Trace Logging 227Log Synchronization 228Log Cleanup and Rotation 228Log Host File System Space 229Log Archiving 229

    Log Server 229Log Archive Storage Server 229Log Archiver Database Server 229Archiving Encrypted Log Files 230

    Other Logging Limitations 231

    Message Router Troubleshooting 232

    Firewalls 234

    TCP/IP Concepts and Terms 234PowerBroker for Unix & Linux Connections 235

    Connections Across a Firewall 235

    PowerBroker for Unix & Linux Shells 237

    Processing 237Shell Startup 237Shell Commands 238

    Shell Script Processing 240Native RootMode 240Enabling Debug Trace Logging 240

    System Upgrades 241

    Operating System and Hardware Upgrades 241Network Upgrades 241

    Adding NIS, NIS+, and Netgroups 241Adding Kerberos 241

    Administration Programs 243

    Contents

    System Administration Guide vii © 2018. BeyondTrust Software, Inc.

  • pbbench 243pbcall 245pbcheck 246pbdbutil 252

    Global Options 254Setting/Configuration Options 255License Management Options 257Authentication Credential Cache Options 258Information Options 258Role Based Policy Options 258Client Registration Options 264Management Event Options 265REST keystore options 266Sudo Database Options 266Registry Name Service Options: 269Database Synchronization Options 274Registry Name Service Cache Options 274File Integrity Monitor Options 275Event Logfile Cache Options 276I/O Logfile Cache Options 277I/O Logfile Queue Options 277Integrated Product Options 278

    pbencode 278pbguid 279pbhostid 281pbkey 281pbless 282pblicense 282pblocald 283pblog 285pblogd 287pbmasterd 289pbmg 291pbnvi 291pbpasswd 292pbping 293pbprint 294pbreplay 294pbreport 301pbrun 303pbssh 306pbsum 308pbsync 309pbsyncd 312pbumacs 313pbuvqrpg 314pbversion 314pbvi 315pblogarchive 316

    Contents

    System Administration Guide viii © 2018. BeyondTrust Software, Inc.

  • Advanced Keystroke Action 319

    Getting Started with Advanced Keystroke Action 319Configure PBUL Policy 319Configure PowerBroker Password Safe 320Configure the Advanced Keystroke Action Primary Server or Policy Servers 320

    Maintenance and configuration of Advanced Keystroke Action Policy 321Advanced Keystroke Action Policy 321

    Preamble 321Variables 322Prerun 326Filter 327Login_sequence 327Completion 327Macros 327Readonly 328Policy 328A simple example of policy 329

    Advanced Keystroke Action Logging / Events 329

    File Integrity Monitoring 331

    Overview 331Policy Configuration 331Predefinitions Section 331Include section 332Exclude section 333Policy Configuration and Maintenance 333

    Syntax 333Initial setup and configuration of the service 334

    REST API 337

    Introduction 337Architecture Overview 337Functionality 338

    Settings 338License 338Policy 338IO Logs 338Event Logs 339Key File 339SOLR 339

    Authentication 339Installation and Configuration 339

    Prerequisites 340REST API Installed Files 340pblighttpd Service 341

    PowerBroker for Unix & Linux REST API Programs 341Configuration of pbconfigd FastCGI Module 343

    Specifying a REST URL Path and Parameters 344

    Contents

    System Administration Guide ix © 2018. BeyondTrust Software, Inc.

  • Examples 344PowerBroker for Unix & Linux REST Calls and Parameters 345

    Authentication 345Settings 345License 346Settings 348License 349Policy 351IO Logs 356Event Logs 360File Integrity Monitoring 362Key File 364REST - Registry Name calls 366Registry Name Service 366Role Based Policy Database Manipulation 369Role Based Policy - Miscellaneous Calls 370Client Registration 374Sudo 375SOLR 377JAVA Implementation of REST API 378

    XWindow System Session Capturing 379

    Introduction 379DISPLAY variable 379

    Architecture Overview 380X11 capture policy settings 380Viewing Session Capture Output 380

    Index 383

    Contents

    System Administration Guide x © 2018. BeyondTrust Software, Inc.

  • IntroductionThis document shows Unix/Linux system administrators how to configure and use the BeyondTrust PowerBroker®for Unix & Linux software. It also provides a general overview of the relevant components of that are used inconjunction with PowerBroker for Sudo.

    PowerBroker for Unix & Linux includes:

    • PowerBroker for Unix & Linux

    • PowerBroker for Networks

    • PowerBroker for Sudo

    • PowerBroker Essentials

    This guide provides a general overview of how PowerBroker for Unix & Linux works and instructions for itsconfiguration and use.

    PowerBroker for Unix & Linux FeaturesPowerBroker for Unix & Linux enables Unix/Linux system administrators to specify the circumstances under whichusers may run certain programs as root or as other important accounts.

    The result is that responsibility for such actions as adding user accounts, fixing line printer queues, and so on, canbe safely assigned to the appropriate people without disclosing the root password. The full power of root is thusprotected from potential misuse or abuse, such as modifying databases or file permissions, erasing disks, or doingmore subtle damage.

    Furthermore, PowerBroker for Unix & Linux is capable of selectively recording all input and output from a session.This audit trail, combined with the safe partitioning of root functionality, provides an extremely secure means ofsharing the power of root. The pbreplay utility enables you to view sessions while they are happening or at alater date. PowerBroker for Unix & Linux can also require a checksum match before running any program, therebyguarding against virus or Trojan horse attack on important accounts.

    PowerBroker for Unix & Linux, through its integration with the SafeNet Luna SA Hardware Security Module (HSM),provides the first privileged user management solution to use FIPS 140-2 Security Level 2 encryption services toachieve compliance with the most strict key storage requirements and standards.

    SafeNet Luna SA is a flexible, network-attached hardware security module that provides powerful cryptographicprocessing and hardware key management for applications where security and performance are a top priority.With FIPS 140-2 Security Level 2 and Common Criteria EAL 4+ validation, SafeNet Luna SA is an Ethernet-attachedhardware security appliance that is designed to ensure the integrity and security of key management for PKI rootkey protection and smartcard issuance, with blazing cryptographic processing for digital signing applications or SSLacceleration for Web servers.

    PowerBroker for Unix & Linux can access existing programs as well as its own set of utilities that execute commonsystem administrative tasks. Utilities that are being developed to run on top of PowerBroker for Unix & Linux canmanage passwords, accounts, backups, line printers, file ownership or removal, rebooting, logging people out,killing their programs, deciding who can log in to what machines from where, and so on. Users can work fromwithin a restricted shell or editor to access certain programs or files as root.

    PowerBroker for Unix & Linux can also optionally encrypt all network traffic that it generates, including controlmessages, input that is keyed by users, and output that is generated by commands that are run throughPowerBroker for Unix & Linux. This encryption protects sensitive data from network monitoring.

    Introduction

    System Administration Guide 11 © 2018. BeyondTrust Software, Inc.

  • PowerBroker for Unix & Linux is built upon two major concepts:

    • Partitioning the functionality of root (and other important accounts) to allow multiple users to carry outsystem administration actions without full access to the administrative account or its password

    • Creating an audit trail of such actions

    PowerBroker for Unix & Linux enables system administration actions to be partitioned without compromisingroot account security. PowerBroker for Unix & Linux enables the system administrator to specify if, and when, ause’s request to run a program is accepted or rejected.

    Through PowerBroker for Unix & Linux, each user can request that a program be run on a machine as root (or asanother important account, such as oracle or admin). PowerBroker for Unix & Linux evaluates the request. Ifthe request is accepted, PowerBroker for Unix & Linux runs the program locally or across a network, on behalf ofthe user.

    With PowerBroker for Unix & Linux, help desk personnel can reset passwords for users that have forgotten themand reinstate user accounts. Project members can clear a jammed line printer queue, kill hung programs, orreboot certain machines. Administration staff can print or delete resource usage logs or start backups.

    Through partitioning, PowerBroker for Unix & Linux allows different users to perform those root actions forwhich they are responsible, but not anything else. PowerBroker for Unix & Linux enables you to specify:

    Which users can perform a particular task

    • Which tasks can be run through the system

    • When the user can perform the task.

    • On which machine the task can be performed

    • From which machine the user may initiate a request to perform the task.

    • Whether another user’s permission (in the form of a password) is required before the task is started.

    • The decisions that are to be made by a program that you supply and which PowerBroker for Unix & Linux callsto determine if a request should be accepted or rejected.

    • Many other miscellaneous properties of requests.

    PowerBroker for Unix & Linux is capable of recording all activity that passes through it to the I/O level. The powerto accurately log activities in a safe environment enables you to implement a secure system administration regimewith an audit trail. You always know exactly what is happening in root, as well as who did it, when it happened,and where.

    Because root can modify any file, special precautions must be taken to ensure the PowerBroker for Unix & Linuxlogs are secure. PowerBroker for Unix & Linux can be configured to receive user requests from the submittingmachine, execute tasks on the execution machine, and log all of the activities on yet another, very secure machine.

    If necessary, the machines that contain the policy files and the log files can be made physically inaccessible to usersand isolated from remote login over the network. In addition, the logs can be printed to hardcopy on a secureprinter or recorded to aWORM drive if required.

    This secure machine can also be assigned a root password, which is unknown to the person who has physicalaccess to it, but known to someone else without physical access. Therefore, the two people would have to colludeto subvert system security. These and other techniques may be used to achieve a high degree of security aroundPowerBroker for Unix & Linux, as well as the root activity logs that PowerBroker for Unix & Linux creates.

    Introduction

    System Administration Guide 12 © 2018. BeyondTrust Software, Inc.

  • Conventions Used in This GuideSpecific font and linespacing conventions are used in this book to ensure readability and to highlight important

    information such as commands, syntax, and examples.

    Font ConventionsThe font conventions used for this document are:

    • Courier New Font is used for program names, commands, command arguments, directory paths,variable names, text input, text output, configuration file listings, and source code. For example:

    /etc/powerbroker/product.cfg

    • Courier New Bold Font is used for information that should be entered into the system exactly as shown.For example:

    pbcheck -v

    • Courier New Italics Font is used for input variables that need to be replaced by actual values. In thefollowing example, variable-name, must be replaced by an actual environment variable name. For example:

    result = getenv (variable-name);

    • Bold is used for Windows buttons. For example:

    Click OK.

    Linespacing ConventionsThe linespacing of commands, syntax, examples, and computer code in this manual may vary from actual Windowsand Unix/Linux usage because of space limitations. For example, if the number of characters required for a singleline does not fit within the text margins for this book, the text is displayed on two lines with the second lineindented as shown in the following sample:result = sprintf ("System administrator Ids: %s %s %s", "Adm1", "Adm2",

    "Adm3");

    Where to Go Next?For licensing information and installation instructions for PowerBroker for Unix & Linux, including packageinstallation, see the PowerBroker for Unix & Linux Installation Guide.

    Documentation for PowerBroker for Unix & LinuxThe complete PowerBroker for Unix & Linux documentation set includes the following:

    • PowerBroker for Unix & Linux Installation Guide

    • PowerBroker for Unix & Linux System Administration Guide

    • PowerBroker for Unix & Linux Policy Language Guide

    • PowerBroker for Unix & Linux Browser Interface Guide

    • PowerBroker for Unix & Linux Diagnostic Messages Guide

    Introduction

    System Administration Guide 13 © 2018. BeyondTrust Software, Inc.

  • • Man pages (for Unix/Linux)

    Sample Policy FilesWhen you install PowerBroker for Unix & Linux, you can choose to copy sample PowerBroker for Unix & Linuxpolicy files to the installation host. These sample policy files include detailed explanations of what they do. You canuse these files to learn how policy files are typically written for various scenarios. The directory that these samplefiles are copied to is determined by the GUI library directory option that you specify during installation.

    By default, this directory is /usr/local/lib/pbbuilder. A readme_samples text file in that directoryincludes a brief description of each sample file.

    Contacting Support

    For support, go to our Customer Portal then follow the link to the product you need assistance with.

    The Customer Portal contains information regarding contacting Technical Support by telephone and chat, alongwith product downloads, product installers, license management, account, latest product releases, productdocumentation, webcasts and product demos.

    Telephone

    Privileged Account Management SupportWithin Continental United States: 800.234.9072

    Outside Continental United States: 818.575.4040

    Vulnerability Management SupportNorth/South America: 866.529.2201 | 949.333.1997

    + enter access code

    All other Regions:Standard Support: 949.333.1995

    + enter access code

    Platinum Support: 949.333.1996

    + enter access code

    Onlinehttp://www.beyondtrust.com/Resources/Support/

    Introduction

    System Administration Guide 14 © 2018. BeyondTrust Software, Inc.

    http://www.beyondtrust.com/Resources/Support/http://www.beyondtrust.com/Resources/Support/

  • OverviewTo effectively administer PowerBroker for Unix & Linux, it is necessary to understand how the product works. Atypical PowerBroker for Unix & Linux configuration consists of the following primary components:

    • pbrun - Used for secured task submission

    • pbmasterd - Used for security policy file processing

    • pblocald - Used for task execution

    • pblogd - Used for writing event logs and I/O logs

    It is possible to install any or all of these components on a single machine, or to distribute them among differentmachines. For optimal security, the Policy Server hosts and log hosts should be separate machines that are isolatedfrom normal activity.

    PowerBroker for Unix & Linux Task RequestsIn the context of PowerBroker for Unix & Linux, there are two types of task requests:

    • Secured – Requests must undergo security validation processing by PowerBroker for Unix & Linux before theycan be run.

    • Unsecured – Do not undergo security validation processing. These should be tasks that are not potentialthreats to the system and therefore do not fall under a company’s security policy implementation. Unsecuredtasks are handled by the operating system. PowerBroker for Unix & Linux is not involved in the processing ofsuch tasks.

    Secured Task Submission to SSH-Managed Devices - pbsshSecured tasks can also be submitted through pbssh. pbssh is the PowerBroker component used to access SSH-managed devices where PowerBroker is not installed (routers, firewalls, Windows devices, or Unix/Linux deviceswhere PowerBroker is not installed). pbssh connects to the target device using the SSH configuration.

    Secured Task Submission - pbrunAll secured tasks must be submitted through pbrun, the PowerBroker for Unix & Linux component that receivestask requests. A separate pbrun process is started for each secured task request that is submitted. If the use ofpbrun is not enforced for secured tasks, then a company’s security policy implementation could be compromised.

    Note: pbrunmust be installed on any machine from which a user can submit a secured task request.

    Policy File Processing - pbmasterdpbmasterd is responsible for applying the security rules (as defined in the PowerBroker for Unix & Linux policyfiles) which make up a company’s network security policy. In other words, pbmasterd performs securityverification processing to determine if a request is accepted or rejected based on the logic in the PowerBroker forUnix & Linux security policy files. If a request is rejected, then the result is logged and processing terminates. If arequest is accepted, then it is immediately passed to pblocald for execution.

    Overview

    System Administration Guide 15 © 2018. BeyondTrust Software, Inc.

  • If pblogd is used, then pbmasterd terminates when the request is passed to pblocald. A separatepbmasterd process is started for each secured task request that is submitted. If the pblogd component is notbeing used, then pbmasterd waits for the pblocald process to complete before terminating.

    Note: During security verification processing, the first accept or reject condition that is met causes securitypolicy file processing to immediately terminate. No further security verification processing is performed.

    If pbmasterd recognizes that a command is to be run on the host that submitted the request, then pblocald isoptimized out of the connection. The command is run directly under the control of the client (that is, pbrun,pbsh, or pbksh), along with all logging and services that would have otherwise been provided by pblocald.

    Task Execution - pblocaldpblocald executes task requests that have passed security verification processing (that is, requests that havebeen accepted by pbmasterd). After a task request is accepted, it is immediately passed from pbmasterd topblocald in normal mode, or to pbrun, pbsh, or pbksh in local and optimized run modes. pblocaldexecutes the task request as the user who is specified in the policy variable runuser, typically root or anadministrative account. This action transfers all task input and output information back to pbrun.

    In addition, pblocald logs pertinent task information to the PowerBroker for Unix & Linux event log (usingpbmasterd or pblogd, depending on how PowerBroker for Unix & Linux has been deployed). The run host canalso record task keystroke information to a PowerBroker for Unix & Linux I/O log (through pbmasterd orpblogd, depending on how PowerBroker for Unix & Linux has been deployed). A separate pblocald process isstarted for each secured task request that is submitted.

    Logging - pblogdpblogd is an optional PowerBroker for Unix & Linux component that is responsible for writing event and I/O logrecords. If pblogd is not installed, then pbmasterd writes log records directly to the appropriate log files ratherthan passing these records to pblogd. In addition, if pblogd is not installed, then pbmasterdmust wait for thepblocald process to complete. If the pblogd is used, then pbmasterd terminates after task execution starts,and pblocald sends its log records directly to pblogd.

    Using pblogd optimizes PowerBroker for Unix & Linux processing by centralizing the writing of log records in asingle, dedicated component and eliminating the need for the pbmasterd process to wait for task execution tocomplete.

    Logging - Message Router (pblighttpd-svc)In PowerBroker for Unix & Linux v10.1.0, a new Message Router service was introduced to streamline theprocessing of Events and other important messages throughout the system. It allows a single Log Server to quicklyaccept, process and store tens of thousands of events every second.

    Step-by-Step Task ProcessingTo make the following information more concise and easier to understand, it is assumed that PowerBroker for Unix& Linux is installed on all of the machines that are involved. It is also presumed that the network is functioning andthere are sufficient resources (memory and disk space) to run the application and log what is required. Errorprocessing within PowerBroker for Unix & Linux reports these problems when they occur.

    This section describes the process that occurs when a task is submitted in PowerBroker for Unix & Linux, andindicates which modes use each part of the process.

    Overview

    System Administration Guide 16 © 2018. BeyondTrust Software, Inc.

  • There are three modes for PowerBroker for Unix & Linux:

    • Normal Mode: In this mode, all tasks are performed including those that are run by pblocald. For moredetail, see Normal Mode Processing.

    • Optimized Run Mode: In this mode, after pbmasterd has accepted a request, the specified task runs directlyon the submit host, without invoking pblocald. Doing this enables the administrator to use pbmasterd tovalidate a command, log the commands that are started in the event log, and record an I/O log for the securedtask. The optimized run mode also reconfirms the password, performs time-out processing, and logs the status.For more details, see Optimized Run Mode Processing.

    • Local Mode: In this mode, after pbmasterd has accepted a request, the specified task runs directly on thesubmit host, without invoking pblocald. This mode enables the administrator to use pbmasterd toauthorize a command, log the accepted task. All other PowerBroker for Unix & Linux functionality is bypassed.For more detail, see Local Mode Processing.

    The following table summarizes the steps that are used for each of the three modes. An X represents a task that isprocessed by a specific mode, and N/A means that the task does not apply in the specified mode.

    Process Task Normal Mode Optimized Run Mode Local ModeSecure task submitted X X XPolicy Server daemonstarts

    X X X

    Policy file processing X X XLocal daemon started X N/A N/ALog daemon started pblocald pbrun pbrunpbrun/pblocald reconnect X N/A N/Arunconfirmuser check pblocald pbrun N/AExecutable check pblocald pbrun pbrunSecured task runs X X XTime-out processing X X N/ASecured task ends X X Xpblocald completes X N/A N/A

    pblogd completesLogs exit status and closes the I/Olog

    Logs exit status and closes the I/Olog

    Closes I/Olog

    pbmasterd completes X X Xpbrun completes X X X

    Task Submitted (All Modes)The initial step is for a user to execute pbrun. This is done either from the command line as:

    pbrun list

    or from a shell script such as:#!/bin/sh

    /usr/local/bin/pbrun list

    where list is the task that is being requested. pbrun checks the settings file and sends the request with other

    Overview

    System Administration Guide 17 © 2018. BeyondTrust Software, Inc.

  • information from the submit host to a Policy Server daemon that is specified in the submitmasters setting.

    Policy Server Daemon Starts (All Modes)The Policy Server daemon (pbmasterd) listens for requests from pbrun. When a request arrives, the PolicyServer daemon checks its settings file. The Policy Server host settings file may be different from the settings file onthe submit host because they may be on different machines. Validation that pbrun is trying to connect isperformed and the rest of the Policy Server processing continues.

    If there is an error at any point in the settings file validation or pbrun connect verification, then pbmasterdstops, and when possible, sends a message for the pbrun session to the user, and validates the client host namechecks.

    Policy File Processing (All Modes)The main action of the Policy Server daemon is to confirm that the user may run a request, and to modify or setvalues for the request. Values can be set in the policy file that affect how the Policy Server daemon runs.

    The values that are set in the policy file are shown in the following table:

    Policy Values Descriptioneventlog Specifies the file in which the events are loggediolog Identifies the file in which the I/O streams are logged

    localmode

    Deprecated in favor of Optimized Run Mode Processing. This mechanism allowed executionon local host without the use of pblocald, with the expense of several features not available.Optimized Run Mode Processing enables all the features that localmode lacks, also withoutusing pblocald. (see Optimized Run Mode Processing).

    lognopassword Specifies whether passwords should be logged

    lognoreconnectIdentifies whether the log server should be allowed to run through pblocald or stayconnected to pbmasterd

    noreconnect Controls whether the Policy Server daemon should stay connected.If necessary as part of the processing, the Policy Server daemon communicates with the pbrun session to getfurther information from the user, such as passwords or input.

    If the log daemon is used and the logmktemp () function is called, then pbmasterd starts the log daemon tocreate a log file on the log host. If the policy language variable lognoreconnect allows it, the log server reconnectsto pblocald when the secured task is ready to run.

    If the processing of the policy file reaches an accept statement, then pbmasterd tries to connect to pblocaldon the run host.

    If the processing of the policy file reaches a reject statement, then pbmasterd logs the result (possibly throughthe log server daemon) and terminates the request.

    If the log daemon is being used, then pbmasterd tries to connect to the log daemon on the log host.

    PowerBroker for Unix & Linux 8.0.2 adds a new policytimeoutmechanism to protect against policies thatappear nonresponsive. See Timeout Processing (Normal Mode and Optimized Run Mode).

    Note: As soon as an accept or reject statement executes, policy file processing stops. No further policy fileprocessing takes place.

    Overview

    System Administration Guide 18 © 2018. BeyondTrust Software, Inc.

  • Local Daemon Started (Normal Mode)The local daemon listens for requests from pbmasterd. When one arrives, it checks its settings file. The run hostsettings file may be different from the settings file on the Policy Server host because they can be on differentmachines. Validation that pbmasterd is trying to connect is performed and the rest of the local processingcontinues. The local daemon immediately determines whether it can accept requests from the Policy Serverdaemon by comparing the host to the acceptmasters line in the settings file.

    If there is an error at any point in the settings file validation or the verification that pbmasterd is trying to connectthe local daemon, then the process stops. When possible, a message is sent via the pbmasterd session for thepbrun session to the user. Validate Policy Server host name checks are also performed.

    Log Daemon Started (All Modes)The log daemon listens for requests from pbmasterd or pblocald. When one arrives, it checks its settings file.The log host settings file can be different from the settings file on the Policy Server host or run host because theycan be on different machines. Validation that pbmasterd or pblocald is trying to connect is performed and therest of the local processing continues.

    If there is an error at any point in the settings file validation or the verification that pbmasterd or pblocald istrying to connect, then the log daemon stops. When possible, a message is sent using the requesting session for thepbrun session to the user. pblocald starts the log daemon in normal mode and pbrun starts the log daemon inlocal mode and optimization run mode.

    pbrun/pblocald Reconnect (Normal Mode)If pbmasterd does not need to stay in the middle of the connection between pbrun and pblocald, it instructspbrun and pblocald to connect directly to each other. pbmasterd then exits.

    pbmasterd removes itself when the following are all true:

    • A log daemon is used.

    • The noreconnect and lognoreconnect variables are false.

    If these conditions are not met, then pbmasterd remains in the job stream and passes the data from pbrun topblocald.

    The only reason a Policy Server daemon would need to stay in the middle of a connection is that the Policy Serverdaemon is located between two subnets that do not normally allow traffic between them.

    runconfirmuser Check (Normal Mode and Optimized Run Mode)With all sessions now established, the pblocald session determines whether the runconfirmuser variable isset and requests the run host password for the runconfirmuseruser user from the pbrun session. If thisrequest fails three times, then the pblocald session stops.

    Executable Check (All Modes)pblocald does some final checking before starting the actual command. If the runcksum or runcksumlistvariable is set, pblocald determines whether the checksum of the command in runcommand matches the valuein runcksum or runcksumlist. If the runmd5sum or runmd5sumlist variable is set, pblocald determineswhether the MD5 checksum of the command in runcommand matches the value in runmd5sum orrunmd5sumlist.

    To log the checksum of the runcommand being compared against runcksum, runcksumlist, runmd5sum,or runmd5sumlist, use the policy variable logcksum.

    Overview

    System Administration Guide 19 © 2018. BeyondTrust Software, Inc.

  • These actions provide protection against viruses, Trojan horses, or other unintentional changes to the program file.pblocald also runs secure command checks. The final checking is done by pblocald for the normal mode andby pbrun in the optimized run mode and local mode.

    Secured Task Runs (Normal Mode)When the pblocald reaches this point, it can finally execute the command specified in the runcommandvariable, pblocald checks that runcommand points to an executable file. If the file is not found or cannot beexecuted, pblocald stops and an error is sent back to the pbrun session.

    pblocald sets up the run environment as follows:

    • The runtime environment to execute the command is established according to the values in the runenv list.

    • The user that is specified in the runuser variable runs the command.

    • The utmp entry is written with the runutmpuser variable value as the user.

    • The syslog is updated.

    • The group is the value of the rungroup variable.

    • The secondary groups are the value of the rungroups variable.

    • The arguments to the command are the values that are specified in the runargv variable. The currentdirectory is the value that is specified in the runcwd variable.

    • The umask is the value of the runumask variable.

    • The nice priority is the value of the runnice variable.

    • If the runchroot variable is set, then the top of the file system is set via chroot (see your Unix/Linux manpages for more details).

    • The processing of HUP signals is set based on the value of the runbkgd variable.

    • pblocald then starts the command.

    Timeout Processing (Normal Mode and Optimized Run Mode)If there is a mastertimeout, submittimeout, or runtimeout in effect (as specified in the policy oroverridden by a client’s runtimeout keyword in the settings), then the session terminates if there is no input oroutput activity within the specified number of seconds. These timeouts are effective only after the policy hasaccepted a request, during the lifetime of the secured task.

    The PowerBroker for Unix & Linux 8.0.2 policytimeout() procedure provides a timeout mechanism that iseffective during policy processing (before an accept; or reject;). This allows protection against pbmasterd/policythat appears nonresponsive waiting for user input, infinite loops within the policy, etcetera.

    Secured Task Ends (All Modes)At some point the task ends, because the command finished, the user interrupted it by pressing CTRL+C, or it wasexited in some other way.

    pblocald Completes (Normal Mode)pblocald recognizes task completion and stops processing. It captures the reason for the completion (such as asignal or an exit code) and sends it for logging as the exitstatus variable. The exittime and exitdate are alsologged. In normal mode, pblocald completes.

    Overview

    System Administration Guide 20 © 2018. BeyondTrust Software, Inc.

  • pblogd Completes (All Modes)If a log server is used, then the I/O log is closed. For normal mode and optimized run mode, the exit status of thesecured task is also logged.

    pbmasterd Completes (Normal Mode Only)If the pbmasterd session is still running, then it shuts down. The pblogd session also shuts down.

    pbrun Completes (Normal Mode and Optimized Run Mode)pbrun displays the exitstatus of the string of the secured task if the task detects an error or abnormal exit.

    The exit status of the secured task is also returned in the pbrun exit status value.

    Normal Mode ProcessingAs shown in the following figure, in normal mode, the machine from which a task is submitted is referred to as thesubmit host. The machine on which security policy file processing takes place is referred to as the Policy Serverhost. The machine on which a task is actually executed is referred to as the run host. The machine on which eventlog records and I/O log records are written is referred to as the log host. Use of the log server daemon pblogd isoptional, but highly recommended.

    Optimized Run Mode Processing[ver 3.5 and earlier] Optimized run mode not available

    [ver 4.0 and later] Optimized run mode available

    Overview

    System Administration Guide 21 © 2018. BeyondTrust Software, Inc.

  • In optimized run mode, after pbmasterd has accepted a request, the specified task runs directly on the submithost, without invoking pblocald. This feature enables the administrator to use pbmasterd to validate acommand, log the commands that were started in the event log, and log the I/O streams for the secured task. Theoptimized run mode also reconfirms the password, performs time-out processing, and logs the status.

    The following figure illustrates the processing when PowerBroker for Unix & Linux is running in the optimized runmode:

    Optimized Run Mode AvailabilityOptimized run mode is enabled when all of the following conditions are met:

    • The Policy Server host must be configured to use a log server.

    • The values of the submithost and runhost variables must be equal.

    • pbrunmust be invoked without the --disable_optimized_runmode command line option.

    • pbmasterdmust be invoked without the --disable_optimized_runmode command line option.

    • The settings file on the submit host must have the clientdisableoptimizedrunmode setting set to no.

    • The settings file on the Policy Server host must have the masterdisableoptimizedrunmode setting setto no.

    • The policy must set the runoptimizedrunmode variable to true.

    Local Mode ProcessingIn local mode (deprecated, except for use with pbsh and pbksh), after pbmasterd has accepted a request, thespecified task runs directly on the submit host, without invoking pblocald. This feature enables the administrator touse pbmasterd to authorize a command and to log the accepted task in the event log. However, unlike optimizedrun mode, this mode does not perform time-out processing, or log the exit status of the accepted task, norAdvanced Control and Audit (ACA). In local mode, the process ‘pbrun’ is replaced by the secured task, unless theI/O Logging is on. Therefore enabling I/O Logging defeats the purpose of local mode.

    With the introduction of optimized run mode, the use of local mode is no longer a benefit, since optimized runmode allows the task to run without invoking pblocald (if on the same host), and allows time-out processing, I/OLogging, logs the exit status of the task, and allows ACA.

    Overview

    System Administration Guide 22 © 2018. BeyondTrust Software, Inc.

  • Local mode processing can be controlled in the /etc/pb.settings file (allowlocalmode setting) or in thepolicy (localmode and runlocalmode variables).

    The following figure illustrates the processing when PowerBroker for Unix & Linux is running in local mode.

    Local Mode AvailabilityLocal mode is enabled when the following condition is met:

    • The allowlocalmode setting on the submit host, Policy Server host, and run host must be set to yes.

    Note: Previously, pbrun could run in local mode when invoked with the -l command line option, or if the policyhad set the runlocalmode variable to true. However, local mode mechanism for pbrun has been deprecatedin favor of Optimized Run Mode.

    Local Mode EffectsLocal mode does the same processing on the submit host and the Policy Server host, including the logging of theaccepted request. However, instead of the Policy Server daemon requesting the pblocald to run the task, thepbrun session is replaced with the task. pblocald is not run when using local mode. pblogdmay be run torecord the “accept” event.

    In local mode, the accepted task runs on the submit host, even if another run host is specified (either on thepbrun command line or with the runhost variable in the policy).

    Local Mode LimitationsBecause the PowerBroker for Unix & Linux programs are not active when a program runs with local mode, thefollowing limitations exist:

    • Exit status of the job is not logged

    • runtimeout and submittimeout cannot be processed

    Overview

    System Administration Guide 23 © 2018. BeyondTrust Software, Inc.

  • • Keystroke actions cannot be processed.

    • The program specified by iologcloseaction() policy procedure is not executed

    PowerBroker VirtualizationPowerBroker Virtualization is a cost-effective solution for consistent granular privilege identity management acrossguest operating systems as well as hypervisor hosts. PowerBroker Virtualization provides granular delegation ofadministrative privileges on virtual guest and host hypervisors, including detailed and flexible reporting withkeystroke logging of administrative actions, for a secure and compliant virtualized datacenter environment.

    PowerBroker Virtualization enables organizations that move to virtualized platforms to control administrativeaccess to the Hypervisor/VMM layer while still realizing all virtualization cost efficiencies. Administrative toolsprevent the virtualization layer from being compromised that could pose significant security risks to all hostedworkloads. Programmable role-constraint mechanisms enforce segregation of duties for users and virtual platform-specific cost-effective deployment capabilities enable secure datacenter virtualization.

    How PowerBroker Virtualization WorksThe following diagram shows how PowerBroker Virtualization works.

    • Automated workflows for policy creation and change management.

    PowerBroker Virtualization FeaturesThe features of PowerBroker Virtualization include:

    • Granular delegation of administrative privileges.

    • Detailed and flexible reporting including keystroke logging of administrative activities.

    • Two-click entitlement reports.

    • Programmable role-constrain mechanisms for segregation of duties.

    • Secures virtual guest and host hypervisors.

    • Supports VMware ESX, Solaris Zones, AIX WPAR, and IBM z/VM.

    Overview

    System Administration Guide 24 © 2018. BeyondTrust Software, Inc.

  • PowerBroker for Unix & Linux and PowerBroker Identity ServicesStarting with V7.0, PowerBroker for Unix & Linux can be integrated with PowerBroker Identity Services. IntegratingPowerBroker for Unix & Linux with PowerBroker Identity Services has the following benefits:

    Event log central collection. PowerBroker Identity Services features a database-centric reporting architecture

    that enables event collection from multiple devices as well as the ability to report about this data from a centrallocation using standard plug-ins. Events are forwarded to the PowerBroker Identity Services collector machineswhere PowerBroker Identity Services tools are installed and are running BTCollector services. The collectormachines then aggregate all events in an enterprise-wide MS SQL Server database.

    Starting with V7.0, PowerBroker for Unix & Linux incorporates the collection of PowerBroker for Unix & Linuxevents (accept events, reject events, finish events, and keystroke action events) by PowerBroker Identity Servicescollectors as well as the ability to query this information using the standard PowerBroker Identity Services reportplug-in.

    The PowerBroker Identity Services Enterprise tools on Windows include a management console, BeyondTrustManagement Console, which supports a number of plug-ins for performing various tasks. The reports plug-in hasmany available reports for viewing configuration and event related queries. PowerBroker for Unix & Linux now hasdedicated reports for the various operations that it performs.

    PowerBroker for Unix & Linux Health Check. Starting with V7.0, PowerBroker for Unix & Linux, as part ofintegration with PowerBroker Identity Services, sends events to PowerBroker Identity Services Collectors based onthe responsiveness of PowerBroker for Unix & Linux Policy Server hosts, log hosts, and pblocald. PowerBrokerfor Unix & Linux clients pbrun, pbsh, pbksh, and pbssh, will optionally report a new failover event every timea PowerBroker for Unix & Linux Policy Server host or log host fails to respond in a timely manner.

    This feature is closely tied to the current PowerBroker for Unix & Linux failover mechanism. Any Policy Server thatdoes not respond within the number of seconds specified by the masterdelay setting will cause the newfailover event to be written to both syslog and the PowerBroker Identity Services event log database. Any log hostthat does not respond within the number of seconds specified by the logserverdelay setting will cause thenew failover event to be written to both syslog and the PowerBroker Identity Services event log database. Similarly,pbmasterd will report events any time pblocald fails to respond. This new feature also allows for the optionalrecording of successful connection events.

    Another plug-in for BMC is the PowerBroker Operations Dashboard. This is a tool that provides a view on keymetrics that an administrator can configure to show green, yellow, and red status indicators depending on user-defined thresholds. The health events are illustrated on this PowerBroker Operation Dashboard using the colorsgreen, yellow, and red to indicate status.

    PowerBroker for Unix & Linux policy creation and deployment: PowerBroker Identity Services offers a PolicyCreation user interface (UI) that provides the ability to create and modify policy data, export policy data to localfiles, import policy data from local files into the PowerBroker Identity Services Policy Creation UI, deliverPowerBroker for Unix & Linux policy data from AD to PowerBroker for Unix & Linux Policy Server hosts, andprocess PowerBroker for Unix & Linux GPO data on a PowerBroker for Unix & Linux Policy Server host. Thesolution relies on the ability of PowerBroker Identity Services to edit custom GPO types in AD through the standardWindows Group Policy Management Console and the ability of gpagent to deliver the GPOs to a system running aPowerBroker Identity Services agent. For more information about this feature, see the PowerBroker IdentityServices Group Policy Guide.

    Overview

    System Administration Guide 25 © 2018. BeyondTrust Software, Inc.

  • Integration ProcessTo enable PowerBroker Identity Services to work with PowerBroker for Unix & Linux, the PowerBroker IdentityServices agent must be installed on the appropriate PowerBroker for Unix & Linux machines:

    • On the PowerBroker for Unix & Linux Policy Server host and log host computers to send the event log records(accept, reject, finish, and keystroke actions events) and the health event log records (related to pblocald)to PowerBroker Identity Services.

    • On the client computers (where pbrun, pbksh or pbsh, and pbssh are installed), Policy Server host, andrun host (where pblocald is installed), to send the health event log records related to the Policy Server hostand log host to PowerBroker Identity Services.

    For instructions on how to install the products, see the PBIS Installation Guide, the PowerBroker for Unix & LinuxInstallation Guide, the PowerBroker for Unix & Linux readme file, and the PowerBroker Identity Services readmefile for more information about the supported platforms.

    To send PowerBroker for Unix & Linux event logs to PowerBroker Identity Services, you must set the following inthe pb.settings file:

    • sharedlibpbisdependencies (see sharedlibpbisdependencies)

    • pbis_event_logging (see PowerBroker Identity Services Event Logging )

    To send event records about the health of the Policy Server host, log host, and pblocald to the PowerBrokerIdentity Services, you must set the following in the pb.settings file:

    • sharedlibpbisdependencies (see sharedlibpbisdependencies)

    • pbis_log_failover (see pbis_log_failover)

    • pbis_log_connect_success (see pbis_log_connect_success)

    PowerBroker for Unix & Linux and BeyondInsight ConsoleStarting with v7.5, PowerBroker for Unix & Linux can be integrated with BeyondInsight. This integration withBeyondInsight has the following benefits:

    • Event log central collection

    BeyondInsight features a database-centric reporting architecture that enables event collection from multipledevices as well as the ability to report about this data from a central location.

    PowerBroker for Unix & Linux uses a message router architecture to store its events (accept events, reject events,keystroke action events, and finish events) in a database, defined by integratedproductsqueuedb, and usesa scheduler to periodically forward these eventlog records to BeyondInsightWeb services. Using BeyondInsight,you can then sort and filter this data into useful reports. BeyondInsight will also use these events to show the list ofPowerBroker for Unix & Linux servers in the list of BeyondInsight Assets.

    • IO log Indexing for improved search capabilities

    This integration will allow BeyondInsight to search for IOLogs via an indexed search. PowerBroker for Unix & Linuxwill use Solr (with Lucene and Jetty) to index IOLog output data and BeyondInsight will perform Solr queries andinterpret/display the results, allowing the user to replay the resulting IOLogs via pbguid.

    Overview

    System Administration Guide 26 © 2018. BeyondTrust Software, Inc.

  • Integration ProcessWhen installing or upgrading you can enable BeyondInsight Integration and provide values to the necessarykeywords to enable these features. Refer to the Installation Guide for more information.

    The following is a summary of the steps to follow.

    To enable PowerBroker for Unix & Linux v7.5 (and later) to send the eventlog records to BeyondInsight, you willneed to:

    1. Copy and convert the BeyondInsight client certificate from BeyondInsight to the Policy Server and Log serverhosts. For more information, refer to the BeyondInsight documentation.a. Start the BeyondInsight Configuration Tool on the BeyondInsight management console server. Click

    Generate Certificate Zip in the BeyondInsight Configuration Tool.b. Select the output folder for the zip file and a password to apply to the exported .pfx file.c. Select a folder where you can securely copy the 'certificates.zip' file and uncompress it.d. Copy the following files to a secure directory on the PowerBroker Policy Server and Log server hosts:

    eEyeEMSClient.pem_eEye_EMS_CA.pem

    e. In the PowerBroker Servers and Log server settings file assign the keyword sslrcscertfile to thelocation of 'eEyeEMSClient.pem':sslrcscertfile //eEyeEMSClient.pem

    assign the keyword sslrcscafile to the location of the file '_eEye_EMS_CA.pem': sslrcscafile//_eEye_EMS_CA.pem

    Note: In the PowerBroker for Unix & Linux settings file, assign to the keyword rcshost the BeyondInsighthostname exactly how it appears in this certificate.

    2. If you have not done so during the installation, set the following keywords in pb.settings on the Policy Serverand Log server hosts:– rcshost

    – rcswebsvcport

    – sslrcscertfile

    – sslrcscafile

    See BeyondInsight Event Logging for more information about these keywords.

    To enable PowerBroker for Unix & Linux v7.5 and above to index IO log files, you will need to:

    1. Install Solr on a server of your choice. Refer to Solr Installation in the PowerBroker for Unix & Linux InstallationGuide for more details.

    2. Copy SSL certs from Solr Server to Policy Server and Logserver hostsOn the Solr server, securely copy the PEM encoded files (*.pem) from the “etc” directory under Solr InstallDirectory (for example /opt/pbul-solr/etc) directory to the directories pointed by ‘solrcafile’, ‘solrclientkeyfile’and ‘solrclientcertfile’ on the desired logserver and Policy Server hosts.

    Refer to the Post-install section of Solr Installation in the Installation Guide for the name of the files to copy.

    3. If you have not done so during the installation, set the following keywords in pb.settings on the Policy Serverand Log server hosts:

    Overview

    System Administration Guide 27 © 2018. BeyondTrust Software, Inc.

  • – pbreplaylog

    – solrhost

    – solrport

    – solrcafile

    – solrclientkeyfile

    – solrclientcertfile

    – integratedproductsqueuedb

    See BeyondInsight I/O Log Indexing and Searching for more information about these keywords.

    Other keywords to set (common to both Eventlog collection and IO log Indexing):

    – pbadminpath

    – guiport

    – sguiport

    – sharedlibkrb5dependencies

    – sharedlibssldependencies

    – sharedlibldapdependencies

    – sharedlibcurldependencies

    See BeyondInsight Event and IO Logging common settings for more information about these keywords.

    Solr Indexing and SearchPowerBroker for Unix & Linux provides separate tar files for Solr installation. Each logserver and Policy Server hostwill be able to communicate with a Solr Server and submit I/O log output data for indexing. BeyondInsight andPBSMC (PowerBroker Servers Management Console) provide a search GUI, allowing users to search indexed I/Ologs using a selected set of variables, but also allowing to search the content of I/O log sessions using queries suchas ‘this AND that AND NOT other OR somethingelse’.

    For each I/O Log file, the result of “pbreplay –O” output of the IOLog file is sent to Solr to be indexed. Some of theeventlog variables in the header of the I/OLog are indexed as well. These variables are: user, runuser, runhost,runcommand and runargv. The name of the I/O Log file name is also indexed, as well as the start and end time ofthe IOLog session.

    You can add user-defined eventlog variables (defined in the policy) to the list of variables to be indexed by setting“solrvariables” in pb.settings to the list of user variables defined in the policy. These variables have to benamed “_pbul”. See solrvariables for more information about this keyword.

    The result displayed will contain a path to the actual I/O log file which can then be replayed using PowerBroker forUnix & Linux GUI (this requires PowerBroker GUI to be installed on the logserver and Policy Server hosts were theI/O log files reside).

    If a problem occurs while trying to contact the Solr server (broken connection, miscellaneous errors, etc.), anappropriate error will be logged in the diagnostics logfile, and the unsent I/O log file name will be saved to beforwarded to the Solr server at a later time.

    Overview

    System Administration Guide 28 © 2018. BeyondTrust Software, Inc.

  • PowerBroker will periodically check to see if there are events that are outstanding, and are older than theautofwdtimesetting. If conditions are met, it will launch the pbreplay admin binary to forward the I/O logdata to Solr server for indexing. The path where pbreplay resides is specified by the setting keywordpbadminpath.

    Starting with PowerBroker for Unix & Linux v10.0.0, a queue mechanism is used to process iologs for Solr, whilelimiting the number of indexing processes. This mechanism is shared by the feature "I/O Log Close Action" (below).

    I/O Log Close ActionThe new PowerBroker Policy procedure iolocloseaction allows the Policy to specify a program that is executed foreach completed iolog. See the Language Guide for details. This mechanism allows the iolog to be processed insome way determined by the specified program. For example, PowerBroker includes a perl script that sends ACAdata from the iolog to Splunk.

    The iologcloseactionmechanism and the Solr indexing mechanism share a queue that allows pbconfigd tocontrol and monitor pbreplay processes, which in turn perform the Solr indexing and iologcloseaction actions.This mechanism uses a combination of fast “write to queue” files, and a database. Each I/O logging process writesthe iolog path and filename to the queue, as well as periodic “heartbeat” information to inform the queuemechanism that the iolog is still being generated. When an iolog is closed (normally), that information is written tothe queue as well. pbconfig runs a scheduled task that transfers data from the IO Log Action queue to both SOLRand any specified IO Log Close Action scripts and once they have been successfully processed the entry is deleted.The scheduler will automatically try to resend any outstanding entries if the SOLR service is down or unavailable.

    Both Solr indexing and iologcloseaction are ultimately processed by pbreplay. pbconfigd runs a scheduledtask that monitors the pbreplay processes handling Solr indexing and/or iologcloseaction. The number of allowedpbreplay processes is configured with the iologactionmaxprocs keyword. pbreplay processes are launchedas needed to process the database queue. The iologactionretry keyword controls the number of retries toacquire a database lock for the internal database queue operations.

    Splunk IntegrationPowerBroker can send Accept and Reject event data to Splunk via syslog, using the syslogsession_start_format andsyslog_reject_format.

    PBUL 10.0.1 adds a new keyword syslogsession_finished_format_logserver, which adds exit status data, andoperates from the logserver (as opposed to the syslogsession_finished_format keyword that operates from eachrunhost). Both syslog and syslogsessions must be set to yes in order to enable those keywords. syslog would needto be configured to send data to splunk. Note that various syslog implementations have data rate limiting and mustbe configured accordingly.

    PowerBroker can also send ACA data to Splunk, via the iologcloseaction() procedure defined in the Policy language.This makes use of perl script closeactionsplunk.pl normally located in /opt/pbul/scripts/. Note that the use of thisPerl script may require additional Perl modules to be installed. This script requires a PBUL REST App ID and App Keyto be configured near the top of the script.

    PowerBroker Unix/Linux now has an example Splunk App available from the Splunk web sitehttps://splunkbase.splunk.com/app/4017/ or from within The Splunk GUI “Apps -> Find More Apps”.

    Once the Splunk App is installed in Splunk, if Splunk is to be configured to accept syslog data, do the followingwithin the Splunk GUI:

    Overview

    System Administration Guide 29 © 2018. BeyondTrust Software, Inc.

  • 1. Click Settings > Data Inputs > UDP + Add New.2. Enter port 514, then click Next.3. Click App Context.4. Select "BeyondTrust App for Splunk (App-BeyondTrust)".5. Click Select Source Type.6. Enter the first few characters of "beyondtrust:syslog". The search box should find "beyondtrust:syslog".7. Select that, and then click Review and then Submit.8. Click Settings > Advanced Search > Search Macros.9. Select the App: BeyondTrust App for Splunk.10. Verify that the macro named get_beyondtrust_index_sourcetype has the Definition: (index="main"

    sourcetype="beyondtrust:syslog").

    To send Reject and Finish event data to Splunk (in a format that the Splunk App recognizes), set the following syslogformatting keywords in /etc/pb.settings on the Policy Servers and Log Servers:syslog_reject_format "BeyondTrust_PBUL_REJECT_Event: Time_Zone='%timezone%';Request_Date='%date%'; Request_Time='%time%'; Request_End_Date='%date%';Request_End_Time='%time%'; Submit_User='%user%'; Submit_Host='%submithost%';Submit_Host_IP='%submithostip%'; Run_User='None'; Run_Host='None'; Run_Host_IP='No IP Address'; Current_Working_Directory='%cwd%'; Requested_Command='%command%'; Requested_Arguments='%argv%'; Command_Executed='None';Command_Arguments='%runargv%'; ACA_Event='False'; ACA_Date='NA'; ACA_Time='NA'; ACA_Authorization='NA'; ACA_CWD='NA'; ACA_Action='NA'; ACA_Target='NA'; ACA_Arguments='NA'; Log_Servers='%logservers%'; Session_Recording_File='Session Not Recorded'; Risk_Rating='%pbrisklevel%';Authorizing_Server='%masterhost%'; Event_Status='Reject'; Exit_Status='%exitstatus%'; Risk_Rating='%pbrisklevel%'; Authorizing_Server='%masterhost%'; Event_Status='Reject'; Exit_Status='%exitstatus%'"

    syslogsession_finished_format_logserver "BeyondTrust_PBUL_ACCEPT_Event: Time_Zone='%timezone%'; Request_Date='%date%'; Request_Time='%time%'; Request_End_Date='%exitdate%'; Request_End_Time='%exittime%'; Submit_User='%user%';Submit_Host='%submithost%'; Submit_Host_IP='%submithostip%'; Run_User='%runuser%'; Run_Host='%runhost%'; Run_Host_IP='%runhostip%'; Current_Working_Directory='%cwd%'; Requested_Command='%command%'; Requested_Arguments='%argv%'; Command_Executed='%runcommand%'; Command_Arguments='%runargv%'; ACA_Event='False'; ACA_Date='NA'; ACA_Time='NA'; ACA_Authorization='NA'; ACA_CWD='NA'; ACA_Action='NA'; ACA_Target='NA'; ACA_Arguments='NA'; Log_Servers='%pblogdnodename%'; Session_Recording_File='%iolog_list%'; Risk_Rating='%pbrisklevel%'; Authorizing_Server='%masterhost%'; Event_Status='Accept'; Exit_Status='%exitstatus%'"

    The Logservers will need the “-r” option to syslog rejects.For example, on RHEL 6.x, edit /etc/xinetd.d/pblogd, changing server_args to include the -r, then restart xinetd.For example:server_args = -r -i xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    Similarly, for RHEL 7.x, edit /etc/systemd/system/[email protected] so that ExecStart includes the -r, and restart thepblogd service.For example:ExecStart=-/usr/sbin/pblogd -r -i xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    Overview

    System Administration Guide 30 © 2018. BeyondTrust Software, Inc.

  • To send ACA data to Splunk (in a format that the Splunk App recognizes), the Policy must specify an IO Log andenable session history as well as specifying an iologcloseaction to run the Perl script. The Example PBUL Policy/opt/pbul/policies/pbul_functions.conf includes example Procedure SplunkRole() to accomplish all the necessarytasks (to enable this procedure, set EnableSplunkRole = true in /opt/pbul/policies/pbul_policy.conf).

    Note that Perl modules such as perl-JSON and perl-Sys-Syslog may need to be installed.

    Create an App ID and App Key for the Splunk script on the Logserver:pbadmin --rest -g SPLUNK-DATA -m SplunkDataAppID

    Then edit the /opt/pbul/scripts/closeactionsplunk.pl script on the Logserver(s) and change the configurable itemsappropriately:1718 my $pbr_appid = "REPLACE-ME";19 my $pbr_appkey = "REPLACE-ME";20

    In addition to editing the App ID and App Key, several other edits may be necessary:

    The closeactionsplunk.pl script currently uses the “auth” syslog facility. Depending on the Log Server OS, this mayneed to be changed to “authpriv” in closeactionsplunk.pl, or “auth” may need to be configured in addition to“authpriv” in /etc/syslog.conf (rsyslog.conf,etc).

    The closeactionsplunk.pl script uses /usr/sbin/pbrestcall internally. This will work for installations without a prefixor suffix. If a prefix/suffix installation is used, edit the script to use the appropriate prefix/suffix for pbrestcall. Thecloseactionsplunk.pl script uses the default rest port (24351), which may need to be changed depending on theactual port used. That port number currently appears in the line:

    my $pbr_url = https://localhost:24351/REST

    REST API PowerBroker for Unix & LinuxA REST API has been developed for PowerBroker for Unix & Linux to allow other software to configure, customizeand retrieve data from PowerBroker for Unix & Linux. The API is web based and uses industry standard moderncomponents, connectors and data elements within a distributed and secure enterprise environment. The softwarewill be installed on the Policy Server, Logserver or run/submit hosts, sudo clients, alongside a suitable HTTP service(one which supports FastCGI), that will provide the communications between the client and the REST services. TheREST API provides an RESTful interface for product settings, policy configuration and IO log retrieval. The REST APIcan be used with PowerBroker for Unix & Linux v7.1.0 and later.

    Note: REST API is not fully supported on Mac OS X.

    See “REST API,” page 337

    Overview

    System Administration Guide 31 © 2018. BeyondTrust Software, Inc.

  • PowerBroker for SudoStarting with v9.1, PowerBroker for Unix & Linux can be integrated with sudo. This integration requiresPowerBroker Sudo to be installed on hosts where sudo is installed. Integrating sudo with PowerBroker for Unix &Linux has the following benefits:

    • Centralization of sudoers policies, stored in a secure database on the Policy Server host.

    • Change management for sudoers policies: Once sudo policies are stored on the policy server, they can bechecked out, modified and checked back in centrally, without the need to go to each sudo host.

    • Integration with PowerBroker for Unix & Linux eventlogs: After sudoers policy processing, an accept or rejectevent is logged in the event log.

    • Integration with PowerBroker for Unix & Linux iolog: Sudo commands can be logged in the I/O logs, and readwith pbreplay.

    PowerBroker for Sudo Architecture

    Overview

    System Administration Guide 32 © 2018. BeyondTrust Software, Inc.

  • PowerBroker Sudo Policy ServerThe PowerBroker Sudo policy server is the central repository of the sudoers policy files. It is highly recommendedthat hosts designated as a PowerBroker Sudo policy servers are isolated from regular user activity to shield policiesfrom users that can elevate their privileges.

    Whenever PowerBroker Sudo is installed on a sudo client host, a copy of the sudoers file, and any included policyfiles, are sent via encrypted file transfer to the PowerBroker Sudo policy server where they are imported into aSQLite database. From then on, whenever sudo runs on a sudo client host, it ensures that it has the latest copy ofthe file(s) from the PowerBroker Sudo policy server. This centralization of the sudoers files gives you better controlover the integrity and consistency of the policies to be used across your organization. Modification of policy files ismade against a singular location, with tools to check-out a file from the policy server’s database and to check it backin when edits are done. The policy changes are automatically distributed to appropriate hosts when the file getspulled down at each sudo invocation at the target host, or by on-demand request.

    Installing PowerBroker Sudo Policy ServerPowerBroker Sudo Policy Server is installed using the pbinstall program (see Installation Guide for PowerBrokerfor Unix & Linux). It should not be confused with PowerBroker for Unix & Linux Policy Server which is designed tosupplant sudo policy processing.

    When you run pbinstall, answer "yes" to the install menu:Install PBSUDO Policy Server?

    Creating an Appid and an AppkeyThe installation program for PowerBroker Sudo Policy Server will create an application ID (appid) and applicationkey (appkey) which are used during the client registration of PowerBroker Sudo hosts. The appid and appkey canbe manually created:# pbdbutil --rest -g appid

    { "appid":"934bbab5-503e-4c40-8486-90c748142431"}

    Creating a registration profileWhen installing PowerBroker Sudo Policy Server for sudo integration, a default profile 'sudodefault' is created bypbinstall and the file /etc/pbsudo.settings.default is generated. When installing PowerBroker Sudo on sudohosts, this 'sudodefault' profile, in conjunction with the aforementioned appid and appkey, can be used during therequired client registration portion of the installation. However, you can also create your own registration profile.First, create the /etc/pbsudo.settings. (where 'name' is a name to identify this specific sudo settings file).This file will be used in your Registration profile and should contain the following settings that you will need to copyfrom /etc/pb.settings:restkeyencryption

    pbrestport

    submitmasters

    transparentfailover

    logport

    logservers

    logserverdelay

    logserverprotocoltimeout

    randomizelogservers

    minoutgoingport

    maxoutgoingport

    Overview

    System Administration Guide 33 © 2018. BeyondTrust Software, Inc.

  • networkencryption

    ssl

    enforcehighsecurity

    ssloptions

    sslpbruncipherlist

    sslcountrycode

    sslprovince

    ssllocality

    sslorgunit

    sslorganization

    susoforceiolog

    Note: The sudoforceiolog in the default sudo profile is set to "no".

    Create the registration profile by running on the PowerBroker for Unix & Linux Policy Server the followingcommand as root:

    # pbdbutil --reg -u '{"name":"","data":[{"type":"save","to":"/etc/pbsudo.settings","fname":"/etc/pbsudo.settings."},{"type":"save","sname":"networkencryption"},{"type":"save","sname":"restkeyencryption"},{"type":"save","sname":"sslservercertfile"}]}'

    Add the pbsudo.settings. to the configuration database by running:# pbdbutil --cfg -l /etc/pbsudo.settings.

    Configuring PowerBroker Sudo Policy ServerAfter the installation, the configuration file “/etc/pb.settings” is created for PowerBroker Sudo policy server, whichit shares with PowerBroker for Unix & Linux, if also installed. The file “/etc/pbsudo.settings.default” is also created,to be used when registering a PowerBroker Sudo client host with this policy server.

    The following settings keywords are added to the “/etc/pb.settings”:

    sudoersdbThe filename and location of the SQLite database where the sudoers files are stored.

    For more details, see “sudoersdb,” page 173.

    Example:sudoersdb /opt/pbul/dbs/pbsudo.db

    sudoersdirThe absolute path of the directory which PowerBroker Sudo Policy Server will use to export and import sudoersfile. Sudoers and included files can be checked out, edited, and checked in using the existing mechanism inpbdbutil, within the "--sudo" option.

    For more details, see “sudoersdir,” page 174.

    Example:sudoersdir /opt/pbul/sudoersdir

    Overview

    System Administration Guide 34 © 2018. BeyondTrust Software, Inc.

  • PowerBroker SudoPowerBroker for Sudo provides a plugin that fits into sudo's modular framework to handle security policyprocessing and I/O logging. This plugin, along with supporting components and utilities, make up PowerBroker Sudoand must be installed on all sudo hosts whose files you want to manage (sudoers files and generated data). Duringinstallation, the active sudoers files from this host is securely transported to the centralized PowerBroker Sudopolicy server repository for storage and maintenance, and the local copy effectively disabled.

    IMPORTANT: Once the sudo policy is in the PowerBroker Sudo Policy Server host, and the PowerBroker Sudopolicy plugin is specified in sudo.conf, any edits to the sudo client's /etc/sudoers or its included files are ignored.The changes to sudoers policies need to be changed on the PowerBroker Sudo Policy Server, by checking out thesudoers files, making the changes, and checking them back in. See "Central Management of Sudoers Policies onPowerBroker Sudo Policy Server" (on page 37).

    Whenever sudo is invoked on the target host to run a command, PowerBroker Sudo on that host first ensures thatit has the latest sudoers file from the PowerBroker Sudo policy server before it proceeds into the policy processingand/or I/O logging. It saves a cached copy of the sudoers policy file so that users are never prevented from issuingsudo commands in case network issues arise . The cached policy remains valid for a configurable amount of timebefore the next update from the policy server is warranted at the next sudo invocation (See “pbsudorefresh,”page 175).

    Note that sudo password validation occurs after policy processing (similar to PowerBroker's runconfirmuser), soany password errors will not be recorded as "rejects" in the PowerBroker for Unix & Linux eventlog. A "finish"event will be generated with the exitstatus 'ConfirmUser failed' (similar to PowerBroker'srunconfirmuser failures) .

    Installing PowerBroker SudoPowerBroker Sudo must be installed on all sudo hosts. The minimum required version of sudo is v1.8, but thepolicy constructs in the sudoers file must be available in v1.8.14 or earlier. The installation requires clientregistration and you will need PowerBroker Sudo policy server's Application ID, Application Key, Client Profilename, as well as the hostname and port for a REST service. Refer to the Installation Guide for PowerBroker for Unix& Linux for more information.

    The pbsudoinstall installer program registers the target sudo host and securely transfers the sudoers policy file,along with relevant include files, to the PowerBroker Sudo policy server for storage and maintenance. It then laysdown PowerBroker Sudo’s customized policy and I/O plugin (pbsudoers.so), hooking it into the sudo front endconfiguration (sudo.conf), simultaneously deactivating any pre-existing plugins for policy processing and IO logging.See "Central Management of Sudoers Policies on PowerBroker Sudo Policy Server" (on page 37) on how to edit thesudoers files at this point.

    Configuring PowerBroker SudoAfter installation, the configuration file “/etc/pbsudo.settings” is created with the necessary information thatPowerBroker Sudo needs to function properly: (e.g., identify the and logservers).

    The following keywords are described below are settings important to PowerBroker Sudo.

    PowerBroker Sudo required settingssubmitmasters

    enforcehighsecurity

    Overview

    System Administration Guide 35 © 2018. BeyondTrust Software, Inc.

  • logport

    logservers

    networkencryption

    pbrestport

    restkeyencryption

    sharedlibcurldependencies

    sharedlibssldependencies

    Other PowerBroker Sudo settingspbsudofailovertimeout

    pbsudorefresh

    sudoforceiolog

    Log Server for PowerBroker SudoPowerBroker Sudo employs one or more log servers to centrally store and manage audit data and sessionrecordings. Establishing dedicated central log servers with data encryption capabilities and keeping them separatefrom hosts where privileged users run daily tasks assures the integrity of your audit trail. PowerBroker Sudo hostsidentify their log servers by the logservers keyword in the product settings file “/etc/pbsudo.settings”.

    After PowerBroker Sudo plugin processes a sudo command on the target host and produces either an accept orreject, it securely transmits the event log records directly to the log server for writing (See "eventlog").

    If sudo is configured to record the user input and/or output, via sudoforceiolog setting or using sudoers log_input/ log_output options or LOG_INPUT and LOG_OUTPUT command tags, then PowerBroker Sudo also sendsthe I/O log records to the log server for storage (See "pbsudo_iolog"). The event log and I/O log files may beencrypted for added security (see eventlogencryption and iologencryption).

    When a PowerBroker for Unix & Linux log server cannot be reached, the sudo event and I/O logging mechanism isused.

    With the event logs and I/O logs stored on the PowerBroker for Unix & Linux log server, you can take advantage ofthe rich features that comes with the product. Among them:

    • Replay the contents of an I/O log using pbreplay

    • Integrate with Splunk (See "Splunk Integration" )

    • Indexed I/O log for fast searches (See "Solr Indexing and Search")

    • Specify I/O log close action (See "I/O Log Close Action" and pbsudo_iologcloseaction)

    • Forward accept/reject events to BeyondTrust BeyondInsight, if integrated, and have access to additional logreporting and analysis tools. “PowerBroker for Unix & Linux and BeyondInsight Console,” page 26

    Installing Log Server for PowerBroker for Unix & LinuxThe log server is installed using the pbinstall program (see Installation Guide for PowerBroker for Unix & Linux).

    When you run pbinstall, answer "yes" to the install menu:Install PowerBroker Log Host?

    Overview

    System Administration Guide 36 © 2018. BeyondTrust Software, Inc.

  • Configuring Log Server for PowerBroker for Unix & LinuxAfter the installation, the configuration file “/etc/pb.settings” is created which contains the following keyword:

    pbsudo_iologThe pbsudo_iolog keyword specifies the pathname where the PowerBroker for Unix & Linux I/O logs from sudoclients are stored.

    For more details, see “pbsudo_iolog,” page 174.

    pbsudo_iologcloseactionThe pbsudo_iologcloseaction keyword specifies an iolog close action for pbsudo iologs.

    For more details, see "pbsudo_iologcloseaction", see on page 123

    Central Management of Sudoers Policies on PowerBroker Sudo Policy ServerWhen sudoers policies are uploaded to a PowerBroker Sudo Policy Server, they will be stored in a SQLite databasein the file and directory specified by 'sudoersdb' settings, and the local sudoers policies on the sudo hosts withPowerBroker Sudo are no longer used when running 'sudo' commands on these hosts. The

    Sudoers policies can be managed from any client or server within the PowerBroker for Unix & Linux enterprise.The command line utility can be used directly on a PowerBroker Sudo policy server, or the user can specify the "--client" argument to the "pbdbutil --sudo" calls to remotely administer the sudo policies.

    To manage the sudoers policies, you will need to export the file, modify it, and re-import it using 'pbdbutil --sudo -e' and 'pbdbutil --sudo -i' commands.

    Export specified sudoer policy file from database [pbdbutil --sudo -e]Note: For export, if you use --force option, target directory structure will get created. If you do not want to use

    force, you can manually create the directories before export.

    # pbdbutil --sudo -e sudohost.bt.com@/etc/sudoers --forceIf there are multiple versions of a file in the database, an export with "-V' option will check out the file withspecified version:

    # pbdbutil --sudo -l -l /etc/sudoers{"pathname":"sudohost.bt.com@/etc/sudoers","version":1,"tag":null,"deleted":0,"created":"2015-07-07 12:15:47"}{"pathname":"sudohost.bt.com@/etc/sudoers","version":2,"tag":null,"deleted":0,"created":"2015-07-07 12:26:59"}# pbdbutil --sudo -e -V "2" sudohost.bt.com@/etc/sudoers --force

    Examples of Import [pbdbutil --sudo -i]# pbdbutil --sudo -i /etc/pbsudoers/sudohost.bt.com/etc/sudoers

    For more examples, see pbdbutil --sudo program.

    Host AliasesA PowerBroker Sudo Host Alias provides a way to group several hosts that share a common set of sudoers policies.This is not the same as a Sudoers Host_Alias, which is resolved inside a sudoers policy. Rather, a PBSudo Host Alias isused by the PowerBroker Sudo Policy Server to select an appropriate policy by mapping different hostnames to thesame arbitrary string.

    Host Aliases are manipulated using the pbdbutil command on the Sudo Policy Server:

    Overview

    System Administration Guide 37 © 2018. BeyondTrust Software, Inc.

  • • To map host names to an alias:

    pbdbutil --sudo -A • To unmap host names from an alias:

    pbdbutil --sudo -X • To list current aliases:

    pbdbutil --sudo -G [pattern]Sudo policies are stored in a database table that is keyed on pathname and version. The version incrementswhenever a new copy is uploaded. The pathname is composed of two parts:

    @/1. The client's fully qualified domain name, and

    2. The client's default sudoers path (usually /etc/sudoers) as reported by sudo -V.

    For example, if your Sudo Policy Server defines sudoersdir in /etc/pb.settings as /etc/pbsudoers, andyour Linux client's name is client0.bt.net, then the pathname to identify its policy will be:

    client0.bt.net@/etc/sudoersBy default, each new client will have its own policy uploaded to the Sudo Policy Server to a unique path duringinstallation after client registration.

    Note: The default sudoers path can vary by host. While it is commonly /etc/sudoers, third-party versionsand custom builds may use different paths, like /usr/local/etc/sudoers. Use sudo -V todiscover the current path. Each alias should be used only for hosts with the same sudoers path. Hosts withthe same sudoers policy but a different sudoers path should use a different alias.

    Note: The client governs the right part following the hostname or alias. The pbsudoers.so plugin defaults to/etc/sudoers on all platforms. Use the sudoers_file plugin argument to specify a different path.

    A PowerBroker Sudo Host Alias can map several hosts to the same policy by substituting an arbitrary ALIAS for thehostname:

    @/

    Note: Host aliases can easily be created by pbsudoinstall during installation on sudo hosts. For moreinformation, see the PowerBroker for Unix & Linux Installation Guide.

    To implement an alias with policies outside of pbsudoinstall, first create a policy for the alias, then assign hoststo the alias. Do all of this on the Sudo Policy Server. This can be done before or after the clients are installed, andre-installation of the clients is not required.

    1. Determine the sudoersdir path defined in the Sudo Policy Server's settings# pbcall -getstringsetting sudoersdir

    For example, we will use /etc/pbsudoers.

    2. Invent an alias name in all uppercase letters. For simplicity, we will use ALIAS.3. Determine the default sudoers file path.

    For familiarity, we will use /etc/sudoers.

    4. Create the policy directory and sudoers file.# mkdir -p /etc/pbsudoers/ALIAS/etc# vi /etc/pbsudoers/ALIAS/etc/sudoers

    5. Verify the policy syntax with visudo, if available.# visudo -c -f /etc/pbsudoers/ALIAS/etc/sudoers

    6. Import the policy into the PBDB.# pbdbutil --sudo -i /etc/pbsudoers/ALIAS/etc/sudoers

    Overview

    System Administration Guide 38 © 2018. BeyondTrust Software, Inc.

  • # pbdbutil --sudo -l7. Map clients to the alias.

    # pbdbutil --sudo -A ALIAS …# pbdbutil --sudo -G ALIAS

    8. Adjust the sudoers_file plugin argument in su