Documentation

Administration programs

This section describes the EPM-UL system administration programs and their options.

pbdbutil, pbadmin

  • Version 8.5.0 and earlier: pbdbutil not available.
  • Version 9.0.0 and later: pbdbutil available.

Starting with version 9, EPM-UL uses database files for the storage of all the normal configuration files and scripts, plus data storage for a range of new facilities. The utility pbdbutil provides a command line tool to maintain all of these databases.

ℹ️

Note

Due to the evolving nature of the pbdbutil command, the name changed to pbadmin. To assist in the transition a symbolic link called pbadmin is now automatically created for your convenience.

The command has global options that are used to carry out maintenance tasks on all databases, and more specific options that allow maintenance of specified databases. Each group of database options have their own usage/help.

Usage

pbdbutil [<options>] [ <file> <file> ...]

Global options

-yUse cached credentials for remote functionality.
-c <files(s)>Perform database integrity check.
-K <file(s)>(Re)encrypt the database.
-O Specify the old database key file.
-COutput in CSV format instead of JSON.
-PPretty print JSON output.

Authentication options

--auth <options...>Various authentication options.
-hHelp on authentication options.

Info options

--info <options...>Various information options.
-hHelp on info options.

License maintenance and statistics options

--lic <options...>License Maintenance and Statistics options.
-hHelp on License Maintenance and Statistics options.

Setting/Configuration/Key options

--cfg <options...>Specify setting/config options.
-hHelp on Setting/Configuration options.

Role based policy options

--rbp <options...>Role Based Policy options.
-hHelp on Role Based Policy options.

Client registration profile options

--reg <options...>Client Registration options.
-hHelp on Client Registration options.

Management event options

--evt <options...>Event options.
-hHelp on Management Event options.

REST keystore options

--rest <options...>REST keystore options.
-hHelp on Management REST keystore options.

Sudo policy database options

--sudo <options...>Sudo database options.
-hHelp on Management sudo database options.

Registry name service database options

--svc <options...>Registry Name Service database options.

Database synchronization options

--dbsync <options...>Database Synchronization options.

Registry name service cache options

--scache <options...>Registry Name Service cache options.

File integrity monitor options

--fim <options...>File integrity monitor options.

Event log cache options

--evtcache <options...>Event Log Cache options.
-hHelp on Event Log Cache options.

IO log cache options

--iocache <options...>IO Log Cache options.
-hHelp on IO Log Cache options.

IO log queue options

--iologidx <options...>IO Log Queue options.
-hHelp on IO Log Queue options.

Integrated product options

--intprod <options...>Integrated Product options.
-hHelp on Integrated Product options.

Write queue status options

--wqstatus <options...>Write queue status options.
-hHelp on Write Queue Status options.

Global options

--check <file(s)...>Do an integrity check on the specified files. If the database(s) are encrypted it attempts to read the file using the database key specified in the pb.settings file.
<-c|--csv>By default all output messages and data is output in JSON format. This option specifies output in Comma Separated Values.
<-p|--pretty>When outputting data in JSON pretty print the data in a more human readable form.
<-K|--newkeypath>

[<-O|--oldkeypath>]

[<file(s)...>]
Reencrypt database file(s) using the specified new key. If the old key path is not supplied it attempts to open the database file with the key specified in pb.settings file.

Setting/Configuration options

These options provide methods to import, maintain and export the settings, configuration and key files that were traditionally kept in files in EPM-UL. These files can now be imported into a database which provide versioning and change management, methods to retrieve, update, and save settings and configuration across the enterprise in a secure manner using the EPM-UL REST services.

These options need to be specified after the --cfg option.

Usage

pbdbutil --cfg [<options>] [ <file> <file> ...]
--reinitReinit/upgrade the database.
-u [ ]Set the specified setting in the current settings file.
      -o Set the specified setting in the specified settings file.
-u '{"":"",...}'Set the specified setting using JSON format.
--verify []Verify the current or specified settings file.
--verify '{"":"",...}'Verify the specified settings using JSON format.
-g Get the specified setting from the current settings file.
    -o Get the specified setting from the specified settings file
         --valueDisplay the value of the variable only.
         --defaultDisplay the default value of the variable only. This is not the value in pb.settings, but the default value when the variable is not defined (or commented out) in pb.settings. The output is displayed in JSON format with all metadata.

Examples:

The following displays the values in JSON format of the variable pbresttimeskew: # pbadmin --cfg --default -g pbresttimeskew{"disabled":true,"description":"Max time skew between hosts(sec)","default":60,"type":"number","gtype":4,"deprecated":false,"name":"pbresttimeskew"}

The following command gets default variable value in simple string form: # pbadmin --cfg --default --value -g

Wildcards are allowed. If used the output is in variable=value format. # pbadmin --cfg --default -g *# pbadmin --cfg --default -g pb*
-g '[""[,""]'Get the specified setting(s) using JSON format.
-d Delete the specified setting in the current settings file.
     -o Delete the specified setting in the specified settings file.
-d '[""[,""]'Delete the specified setting(s) using JSON format.
-i [<file(s)>]Import/update all or specified .cfg file(s) in the database.
    -m Specify message. Required when change management enabled.
-NDo not rename file on import.
-e [<files(s)>]Export all or specified .cfg file(s) in the database.
-e -o Export .cfg file from database and output to new file name.
    --forceForce the overwrite of the output file when exporting.
     --lockLock/checkout the exported file in the database when exporting
    -V <ver|tag>Used with export .cfg file, but export given version or tag.
-D [<file(s)>]Diff all/specified file(s) with current exported file(s).
    -V <from:to>Used to specify from/to versions to diff.
    -V <ver|tag>Used to specify version or tag to diff.
-r <files(s)>Mark specified .cfg file(s) deleted in the database.
-lList active .cfg files in the database.
     -lList all .cfg files in the database.
         -lList .cfg files and their current versions in the database
     -s <[-|+]attribute>Sort the list of records by attribute (asc/desc).
-l <file(s)>List version information of .cfg file(s) in the database.
-t [<file(s)>]Tag .cfg file(s) in the database at current version.
-x [<file(s)>]Delete tag from .cfg file(s) in the database.
-k <file(s)>Encrypt .cfg file(s) in the database.
n [--force] <file(s)>Create new key file(s) in the database
-K <files(s)>Lock .cfg files in the database.
-UForce unlock of locked cfg files in the database
-A <...>Set file as being automatically synchronized within Service Group
-X <...>Unset file as being automatically synchronized within Service Group
-LList synchronization configuration for cfg files in the database
-u [ ]Set the setting in the current settings file.

Descriptions

"<-i|--import>" "<-m|--msg>" "" "[<file(s)...>]"Import specified settings, configuration or key files into the /etc/pb.db database. If Change Management is enabled, a message must be supplied to log in the audit event database. If no files are specified on the command line, all files that already exist in the database are checked and imported if required.
<-e|--export> [-f] [<file (s)...>]
<-e|--export> [-f] <-V|-- version> <num|tag> [<file (s)...>]
<-e|--export> [-f] <-o|-- output>
<-e|--export> [-f] <-V|--version> <num|tag> <-o|-- output>
Export specified settings, configuration or key file(s) from the /etc/pb.db database. If no files are specified on the command line, all files that exist in the database are exported. Specific versions or tagged groups of files can be exported. If the output file(s) already exist the -f parameter must be applied to force the overwrite of the existing file.
<-l|--list>List all the current files held in the /etc/pb.db database.
<-l|--list> [-j] [<file (s)...>]List all the versions of specified files held in the /etc/pb.db database. By default this is displayed in .csv, but can be displayed in JSON using the -j option. Specify a tag for current versions of files that exist in the /etc/pb.db database. These files can then be exported as a tagged group to facilitate change sets of files.
<-t|--tag> [<file (s)...>]Specify a tag for current versions of files that exist in the /etc/pb.db database. These files can then be exported as a tagged group to facilitate change sets of files.
If file names are not specified, all current versions are added to the tagged group.
<-d|--deltag> [<file(s)...>]Remove the tag from files specified. If file names are not specified, the tag is removed from all files that exist in the /etc/pb.db database.
<-k|--encrypt> [<file(s)...>]Encrypt existing setting/configuration files in the /etc/pb.db database.
<-n|--newkey> [<file(s)...>]Create a new key file in the/etc/pb.db database.

License management options

ℹ️

Note

These options are not available on EPM-L clients.

As of version 10.0, License Management is centralized and can be carried out on the primary license server using the command pbadmin.

This command line administration tool provides methods to update the license string, to list summary statistics and to retire clients to free up licenses.

All of the commands that list statistics can be run from any server that provides a service. All commands that update the database, such as updating the license itself or retiring clients, should be run on the primary license server:

Example

pbadmin --lic -u '{ "PBULPolClnts":200, "SudoPolClnts":200, "RBPClnts":200, "ACAClnts":1, "AKAClnts":0, "FIMClnts":0, "SOLRClnts":1, "Owner":"My Company Corp", "Comment":"Standard License for My Company", "AutoRetire":7, "Recycle":7, "Expires":"2018-03-01 00:00:00", "Terminates":"2019-03-01 00:00:00", "HostId":"7faf7681-4d42-4b69-00bfdad93b4a3dfb", "HMAC":"UtGE3tD6qK2UwutY3GFOqodjdq30pEDAW2cKb5/OaMc="}'

This command updates the installation with the license string provided by BeyondTrust to a standard license.

Usage

pbadmin --lic [<options>] ...
-u '{ param }'Update primary license server license where the { param } argument is the supplied JSON formatted license.
-u Update primary license server license where is the path to a file that contains the supplied JSON formatted license.
-GRetrieve the license string and attributes.
-l [] [-l]List client license usage summary. Supply an extra -l to detail service information.
-l '{ …

["fqdn" : "",]
["retired" : <true|false>,]
["updated_older" : ,]
["updated_newer" : ,]
["updated_older" : { "years" : n, "months" : n, "days" : n, "hours" : n ]
["updated_newer" : { "years" : n, "months" : n, "days" : n, "hours" : n ]
Alternatively specify a filter expression to list only those clients that match the filter.
-s <[-|+]attribute>Use -s to sort the list of records by attribute name (asc/desc).
-L [] [-L]List client Service License Usage summary. Specify an extra -L to detail client information.
-r {"uuid" : "<uuid|wildcard>"}
-r {"uuid" : ["<uuid|wildcard>", "uuid", ...]}
-r {"fqdn" : "<fqdn|wildcard>"}
-r {"fqdn" : ["<fqdn|wildcard>", "fqdn", ...]}
--force
Retire client(s) by UUID or FQDN. Use --force to over-ride warning message.
-RImmediately refresh the license statistics from the primary license server.
--wq The license write queue file includes the following records:
  • sent:The number of records successfully sent and acknowledged.
  • pending: The number of records that have been sent but not yet acknowledged.
  • notprocessed: The remaining number of records to be processed.
  • lastbatch: The last pending batch number if pending records are present, zero otherwise.

Sample commands

pbadmin --lic -GRetrieves the full license string, detailing the entitlements and expiry of the license.
pbadmin --lic -lLists all of the clients that are currently licensed throughout the installation.
pbadmin --lic -LLists the summary statistics referenced by the EPM-UL service type.
pbadmin --lic -l '{ "retired": true }'Lists all of the clients that are currently manually retired.
pbadmin --lic -l '{ "fqdn" : "*.mydom.com" }'Lists all of the clients that have been licensed are in the mydom.com domain.
pbadmin --lic -l '{ "updated_older" : "2018-01-01" }Lists all of the clients that were last updated before the 1st of January 2018.
pbadmin --lic -l '{ "updated_older" : { "months" : 6 }}'Lists all of the clients that were last updated 6 months or more ago.
pbadmin --lic -r '{ "uuid" : "7faf7681-4d42-4b69-00bfdad93b4a3dfc" }' --forceManually retires a client specified by its unique id.
pbadmin --lic -r '{ "updated_older" : { "days" : 120 }}' --forceManually retires all clients that have not been updated in the last 120 days.

Authentication credential cache options

These options allow users of pbdbutil to cache credentials to facilitate working with remote services.

Usage

pbdbutil --auth [<options>] [ <file> <file> ...]

Auth options

--login { "appid":"","appkey":"<appkey"[,"svc":""]}Cache specified appid/appkey credential for authentication.
--logout [{"key":""[,"svc":""]}]Remove default or specified credential key from cache.
-lList cached credentials.
-hHelp on auth options.

Information options

These options provide various information about the current system configuration or status.

Usage

pbdbutil --info [<options>]

Info options

--fqdn []Get fully qualified name for this host or hostname.
--schedList Scheduler tasks.
--uuidGet the local hosts UUID.
--msgs [--level= ]Retrieve the Message Router statistics.
Set --level=2 to include additional debugging information:
  • Head and tail of the chunks
  • Record count
  • Semaphore count
--timewrites <0|1>Use this option to log the time it takes to write the event to the configured destinations. The results are written to the configured pbrest.log file.
To enable debugging, set --timewrites to 1.
To turn debugging off, set --timewrites to 0.
Use for brief periods as log file entries are generated in pbrest.log.
--restsvrRetrieve the REST Service statistics.
-hHelp on info options.

Role based policy options

ℹ️

Note

These options are not available on EPM-L clients.

The Role Based Policy is held in multiple tables. Each table refers to an individual entity with attributes, and is referenced by unique entity ids. Each entity is then linked together into a role. When retrieving, updating, or deleting entities, either the name or id can be used. The command line utility pbdbutil with the option --rbp can be used to retrieve (-g), update (-u), or delete (-d) entities.

When updating, complete entities including all its attributes need to be defined. The REST API uses the same JSON format and parameters, and use GET, PUT and DELETE respectively. There are also a number pseudo-attributes that allow the retrieval of lists based upon the parent grouping, these are:

  • usergrpname: list User Lists which correspond to the specified User Group
  • hostgrpname: list Host Lists which correspond to the specified Host Group
  • cmdgrpname: list Command Lists which correspond to the specified Command Group
  • tmdategrpname: list Time/Date Lists which correspond to the specified Time/Date Group
  • rolename: list all lists which correspond to the specified Role Group

Usage

pbdbutil --rbp [<options>] [ <file> <file> ...]
-b  -m Begin Role Based Policy change transaction
-cCommit Role Based Policy change transaction
-rRollback Role Based Policy change transaction
    --force -m Force Rollback of other users change transaction
-i Import Role Based Policy file in the database
-e -o Export Role Based Policy from database and output to file
    -V Used with export, but export specified version
-g { json param }Get Role Based Policy database records
-u { json param }Update Role Based Policy database records
    -m Specify message - required when change management enabled.
-d { json param }Delete Role Based Policy database records
    --forceForce deletion of dependent records in the database
    -m Specify message - required when change management enabled.
-nCreate new Role Based Policy database
-R { json param }Report user entitlements from the database
    -RAdd option to display commands
       -RAdd option to display time/date restrictions
         -RAdd option to display additional role options
-E { json param }List user entitlements data from the database
where { json param } is one or more of:
     "submituser" : "user1" Specify submit user or wildcard
     "submithost" : "host1" Specify submit host or wildcard
     "runuser" : "user1" Specify run user or wildcard
     "runhost" : "host1" Specify run host or wildcard
     "command" : "command" Specify command or wildcard
-LList all Role Based Policy policies in the database
    -t Limit list by tag wildcard
-lList all Role Based Policy versions in the database

Example

Sample use of the pbdutil --rbp when rbptransactions is set to yes.

pbdbutil --rbp -b -m "<message>"``pbdbutil --rbp -i <file>``pbdbutil --rbp -c

Example

List all of the User Groups whose name matches ug*

pbdbutil --rbp -g '{ "usergrp" : { "name" : "ug*" }}'
[{"id":1,"ug1":"name","description":"desc","disabled":0,"single":0,"type":"I","ext info":null}]

Example

List the User Group whose id=1

pbdbutil -g '{ "usergrp" : { "id" : "1" }}'
[{"id":1,"ug1":"name","description":"desc","disabled":0,"single":0,"type":"I","ext info":null}]

Record entities

usergrp, userlist, hostgrp, hostlist, cmdgrp, cmdlist, tmdategrp, tmdatelist, role, roleusers, roleghost, rolecmds, roletmdates

Entities can be listed by attributes name and id, and entity specific attribute names rolename, usergrpname, hostgrpname, cmdgrpname, tmdategrpname.

Example

-g '{ "role" : { "name" : "*" }} ' Display all Roles
-g '{ "usergrp" : { "name" : "n*" }}' Display all User Groups which match "n*"
-g '{ "userlist" : { "name" : "usergrp1" }} ' Display group membership for usergrp by name
-g '{ "roleusers" : { "rolename" : "role1" }}' Display list of usergrps assigned to role
-g '{ "rolehosts" : { "id" : 1 }} ' Display list of hostgrps assigned to role id 1

Descriptions

-bThis option is mandatory if the Role Based Policy transactions are enabled. Role Based Policy transactions are enabled when rbptransactions is set to yes.
Before any changes can be made the administrator must begin the transaction with a suitable Change Management message. This transaction is then kept open until the same user commits or rolls back the transaction. The transaction is not visible by the live authorization process until it is committed.
Available if the Role Based Policy Transactions are enabled.
-cCommit the current open transaction making it live.
-r [ --force ]Rollback the current open transaction, discarding any changes that have been made.
Available if the Role Based Policy Transactions are enabled
-i Import Role Based Policy file in the database.
-e -o [-V ]Export Role Based Policy from database and output to file.
-g { json param }Retrieve and display attributes of the entities within the Role Based Policy database.
-u { json param }Update entities and attributes within the Role Based Policy database.
-d { json param }Delete entities within the Role Based Policy database.
-nCreate a new Role Based Policy database, as specified by the policydb keyword in the EPM-UL/etc/pb.settings configuration file.
-R { json param }Report user entitlements from the database.
  -RAdd option to display commands.
    -RAdd option to display time/date restrictions.
      -RAdd option to display additional role options.
-E { json param }List user entitlements data from the database where { json param } is one or more of:
 "submituser" : "user1" Specify submit user or wildcard
 "submithost" : "host1" Specify submit host or wildcard
 "runuser" : "user1" Specify run user or wildcard
 "runhost" : "host1" Specify run host or wildcard
 "command" : "command" Specify command or wildcard
-LList all Role Based Policy policies in the database
-lList all Role Based Policy versions in the database

User group examples

-g '{ "usergrp" : { "name" : "ug*" }}' [{"id":1,"ug1":"name","description":"desc","disabled":0,"single":0,"type":"I","extinf o":null}]Retrieve list of User Groups that match ug*
-g '{ "userlist" : { "usergrpname" : "ug1" }}' [{"id":1,"user":"root"},{"id":1,"user":"adm*"}]Retrieve list of Users in the User Group ug1</b
-u '{ "usergrp" : { "id":1,"name":"ug1","description":"new description","disabled":0,"single":0,"type":"I","extinfo":null}}'Update User Group ug1 with new attributes
-u '{ "userlist" : { "usergrpname":"ug1","user":"wheel"}}'Add new user to User Group ug1</b
-d '{ "userlist" : { "usergrpname":"ug1"}}'To delete all users from User Group ug1
-d '{ "userlist" : { "usergrpname":"ug1", "user" : "user1"}}'To delete specified user from User Group ug1

Host group examples

-g '{ "hostgrp" : { "name" : "hg*" }}' [{"id":1,"hg1":"name","description":"desc","disabled":0,"type":"I","extinf o":null}]Retrieve list of Host Groups that match hg*
-g '{ "hostlist" : { "hostgrpname" : "hg1" }}' [{"id":1,"host":"host2"},{"id":1,"host":"*.dev.com"}]Retrieve list of Hosts in the Host Group hg1
-u '{ "hostgrp" : { "id":1,"name":"hg1","description":"new description","disabled":0,"type":"I","extinfo":null}}'Update Host Group hg1 with new attributes
-u '{ "hostlist" : { "hostgrpname":"hg1","host":"host5"}}'Add new host to Host Group hg1
-d '{ "hostlist" : { "hostgrpname":"hg1"}}'To delete all hosts from Host Group hg1
-d '{ "hostlist" : { "hostgrpname":"hg1", "host" : "host1"}}'To delete specified host from Host Group hg1

Command examples

-g '{ "cmdgrp" : { "name" : "cg*" }}' [{"id":1,"cg1":"name","description":"desc","disabled":0} ]Retrieve list of Command Groups that match cg*
-g '{ "cmdlist" : { "cmdgrpname" : "cg1" }}' [{"id":1,"cmd":"rm *","rewrite":"echo $*"},{"id":1,"cmd":"/usr/bin/rm *","rewrite":"echo $*"}]Retrieve list of Commands in the Command Group cg1
-u '{ "cmdgrp" : { "id":1,"name":"cg1","description":"new description","disabled":0}}'Update Command Group cg1 with new attributes
-u '{ "cmdlist" : { "cmdgrpname":"cg1","cmd":"/bin/rm *","rewrite":"echo $*"}}'Add new command to Command Group cg1
-d '{ "cmdlist" : { "cmdgrpname":"cg1"}}'To delete all commands from Command Group cg1
-d '{ "cmdlist" : { "cmdgrpname":"cg1", "cmd" : "rm *"}}'To delete specified cmd from Command Group cg1

Time/Date examples

-g '{ "tmdategrp" : { "name" : "td*" }}' [{"id":1,"td1":"name","description":"desc","disabled":0} ]Retrieve list of Time/Date Groups that match td*
-g '{ "tmdatelist" : { "tmdategrpname" : "td1" }}' [{"id":1,"tmdate" : "{ \"mon\" : [0,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,3,0,0,0,0,0,0], \"tue\" : [0,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,3,0,0,0,0,0,0], \"wed\" : [0,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,3,0,0,0,0,0,0], \"thu\" : [0,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,3,0,0,0,0,0,0], \"fri\" : [0,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,3,0,0,0,0,0,0], \"sat\" : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], \"sun\" : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] }"}]Retrieve list of Time/Dates in the Time/Date Group td1
-u '{ "tmdategrp" : { "id":1,"name":"td1","description":"new description","disabled":0}}'Update Time/Date Group td1 with new attributes
-u '{ "tmdatelist" : { "tmdategrpname":"td1","tmdate":"{ \"range\" : { \"from\" : 1415851283, \"to\": 1415887283 }}"}}' Add new time/date to Time/Date Group td1
-d '{ "tmdatelist" : { "tmdategrpname":"td1"}}'To delete all times/dates from Time/Date Group td1
-d '{ "tmdatelist" : { "tmdategrpname":"td1", "tmdate" : "{ \"range\" : { \"from\" : 1415851283, \"to\": 1415887283 }}"}}'To delete specified cmd from Time/Date Group td1

Role examples

-g '{ "role" : { "name" : "Role*" }}' [{"id" : 0, "name" : "Role5", "rorder" : 3, "description" : "Desc3", "disabled" : 0, "risk" : 1, "action" : "A", "iolog" : "/tmp/iolog_XXXXXX", "script" : "accept;"}, {"id" : 1, "name" : "Role6", "rorder" : 2, "description" : "Desc3", "disabled" : 0, "risk" : 1, "action" : "A", "iolog" : "/tmp/iolog_XXXXXX", "script" : null}, {"id" : 2, "name" : "Role7", "rorder" : 1, "description" : "Desc3", "disabled" : 0, "risk" : 1, "action" : "A", "iolog" : "/tmp/iolog_XXXXXX", "script" : null}]Retrieve list of Roles that match Role*
-g '{ "roleusers" : { "name" : "Role6" }}' [{"id":1,"users":1,"type":"R"},{"id":1,"users":1,"type":"S"}] Retrieve list of User Groups listed in the role Role6
`-u '{ "role" :
{"id":0,"name":"Role5","rorder":3,"description":"Description
4","disabled":0,"risk":1,"action":"A","iolog":"/tmp

/iolog_XXXXXX","script":"accept;"}, {"id":1,"name":"Role6","rorder":2,"description":"Desc3","disabled":0,"risk":1,"action":"A","iolog":"/tm

p/iolog_XXXXXX","script":null},
{"id":2,"name":"Role7","rorder":1,"description":"Desc3","disabled":0,"risk":1,"action":"A","iolog":"/tmp/io

log_XXXXXX","script":null}'`
Update role Role5 with new attributes
-u { "rolehosts" : { "name" : "Role5", "hostgrpname" : "hostgrp2" , "type" : "S"}}'Add new Submit Host, hostgrp2, to role Role5
-d '{ "roleusers" : { "name":"Role5"}}'To delete all User Groups from role Role5
-d '{ "roleusers" : { "name" : "Role5", "usergrpname":"ug1"}}'To delete specified User Group from role Role5
-d '{ "roleusers" : { "name":"Role5"}}'To delete all User Groups from role Role5
-d '{ "roleusers" : { "name" : "Role5", "usergrpname":"ug1"}}'To delete specified User Group from role Role5

ℹ️

Note

For more information on the -bsetting in the Endpoint Privilege Management/etc/pb.settings configuration file, see Role Based Policy.

Client registration options

ℹ️

Note

These options are not applicable to EPM-L.

These options provide methods to create, maintain, export, and import role-based policies into EPM-UL, used with the --rbp option.

Usage

pbdbutil --reg [<options>] [ <file> <file> ...]
-g { json param }Get Client Registration profile records.
-u { json param }Update Client Registration profile records.
-d { json param }Delete Client Registration profile records.
-nCreate new Client Registration profile database.
-lList all Client Registration profiles in the database.

Client registration database options

These options provide methods to define and maintain Client Registration profiles, used to simplify the registration of hosts within the Endpoint Privilege Management enterprise.

"<-g|--get>" "{ param }"

Example

Retrieve Client Registration profile using the specified name:

-g ’{ "name" : "default" }

    {"type":"settings","fname":"/etc/pb.settings"}
    {"type":"certificate","to":"/etc/${prefix}pbrest.pem${suffix}"}
    {"type":"save","sname":"networkencryption"}
    {"type":"save","sname":"restkeyencryption"}
    {"type":"save","sname":"sslservercertfile"}
{"type":"save","sname":"sslserverkeyfile"}
"<-u|--update>" "{ param }"

Examples

Update the specified Client Registration profile:

-u ’{ "name" : "prof1", [{"type":"settings",
    "fname":"/etc/pb.mysettings"},
{"type":"save","sname":"networkencryption"} ]’
"<-d|--delete>" "{ param }"

Example

Delete the specified Client Registration profile:

-d ’{ "name" : "prof1" }’
<-l|--list>

List all the Client Registration profiles.

<-n|--new>

Create and initialize the Client Registration database.

RNS options

These options allow the maintenance and interrogation of the Registry Name Services.

Usage

pbdbutil --svc [<options>] [ <file> <file> ...]
-u '{ "svcgname" : "name", params... }'Create/Update Registry Name Service Group.
-u '{ "cn" : "hname", params... }'Create/Update Registry Name Service Host.
-u '{ "cn" : "hname", "uuid" : "", params... }'Create/Update external Host in Registry Name Service.
     [--bycn hname]Specify existing common name to update (change to the cn and uuid specified in -u, optional)
-u '{ "svcgname" : "name", "cn" : "hname", params... }'Add/Update Registry Name Service Host to Service Group.
-g '{ "svcgname" : "name" }'Retrieve Registry Name Service Group information.
-g '{ "primary" : "name" }'Lookup the Primary Server within the Registry Name Service Group.
-g '{ "cn" : "name" }'Retrieve Registry Name Service Host information by host common name.
-g '{ "uuid" : "name" }'Retrieve Registry Name Service Host information by uuid.
-d '{ "svcgname" : "name" }'Delete Registry Name Service Group.
-d '{ "svcgname" : "name", "cn" : "name" }'Remove a host from Registry Name Service Group.

ℹ️ Note

After deleting a server from registry name service group (registry_name_service), execute the following command to force a service cache update on all servers and clients. # pbadmin --scache -R --all
-d '{ "cn" : "name" }'Delete Registry Name Service Host by host common name.
         [--remove]Remove the Registry Name Service Host completely from the database (optional).
-z Rename Registry Name Service Group.
-l [<wildcard(s)>]List all the Registry Name Service Groups that match wildcard(s).
    -lAdd an extra -l to list Servers in the Registry Name Service Group(s).
        -lAdd a third -l to list all hosts in the Registry Name Service Groups.
-L [<wildcard(s)>]List all the Hosts that match wildcard(s).
    -LAdd an extra -L to list Service Group membership and role.
-p <hostPromote host to primary service within the specified Registry Name Service Group.

ℹ️ Note

After promoting a server in registry name service group (registry_name_service), execute the following command to force a service cache update on all servers and clients. # pbadmin --scache -R --all
-N [[ []]Create and initialize Primary Registry Name Service database.
-nCreate new Registry Name Service database.
-m Specify message. Required for modification commands when change management enabled.

Example

Recreate the Registry Name Service Database

# pbdbutil --svc -N --force

Example

List Service Groups from Registry Name Service Database

# pbdbutil -P --svc -l

Result:

{
    "svcgid": 1,
    "svcgname": "registry_name_svc",
    "svc": "registry",
    "updated": "2016-06-09 15:42:33",
    "deleted": 0
}
{
    "svcgid": 2,
    "svcgname": "dfl_pb_policy_svc",
    "svc": "pbpolicy",
    "updated": "2016-06-09 15:42:33",
    "deleted": 0
}
{
    "svcgid": 3,
    "svcgname": "dfl_log_svc",
    "svc": "logsvr",
    "updated": "2016-06-09 15:42:33",
    "deleted": 0
}
{
    "svcgid": 4,
    "svcgname": "dfl_sudo_policy_svc",
    "svc": "sudopolicy",
    "updated": "2016-06-09 15:42:33",
"deleted": 0
}

Example

List primary and secondary servers within the Service Groups

# pbdbutil -P --svc -l -l

Result:

{
    "svcgid": 1,
    "svcgname": "registry_name_svc",
    "svc": "registry",
    "updated": "2016-06-14 10:43:14",
    "deleted": 0,
    "svcs": [
{
    "svcgid": 1,
    "hostid": 1,
    "role": "primary",
    "created": "2016-06-14 10:43:14",
    "updated": "2016-06-14 09:43:14",
    "deleted": 0,
    "cn": "pbuild",
    "uuid": "969ecab2-93d8-4322-a8cf-6314457053bb",
    "fqdn": "pbuild",
    "addrs": [
    {
    "family": 4,
    "port": 24351,
    "addr": "192.168.16.138"
    }
    "tnlzone": 0
    }
    ]
    }
    {
    "svcgid": 2,
    "svcgname": "dfl_pb_policy_svc",
    "svc": "pbpolicy",
    "updated": "2016-06-14 10:43:14",
    "deleted": 0
    }
    {
    "svcgid": 3,
    "svcgname": "dfl_log_svc",
    "svc": "logsvr",
    "updated": "2016-06-14 10:43:14",
    "deleted": 0
    }
    {
    "svcgid": 4,
    "svcgname": "dfl_sudo_policy_svc",
    "svc": "sudopolicy",
    "updated": "2016-06-14 10:43:14",
    "deleted": 0
}

Example

Retrieve specified Service Group

pbdbutil --svc -g '{ "svcgname" : "registry_name_svc" }'

Result:

{"svcgid":1,"svcgname":"registry_name_svc","svc":"registry","updated":"2016-06-06 16:56:53","deleted":0}

Example

Retrieve Specified Host by "cn"

pbdbutil --svc -g '{ "cn" : "pbuild" }'

Result:

{"addrs":[{"family":4,"addr":"192.168.16.138","port":24351}],"cn":"pbuild","uuid":"969ecab2-93d8-4322-a8cf-6314457053bb","$

Example

Retrieve Specified Host by "uuid"

pbdbutil --svc -g '{ "uuid" : "969ecab2-93d8-4322-a8cf-6314457053bb" }'

Result:

{"addrs":[{"family":4,"addr":"192.168.16.138","port":24351}],"cn":"pbuild","uuid":"969ecab2-93d8-4322-a8cf-6314457053bb","$

Example

Retrieve Host Entry for the Primary of the Specified Service Group

pbdbutil --svc -g '{ "primary" : "registry_name_svc" }'

Result:

{"svcgid":1,"svcgname":"registry_name_svc","svc":"registry","updated":1465228621,"deleted":0,"hostid":1,"role":"primary","$

Example

Retrieve Host Information for Specified Host

pbdbutil --svc -L pbuild

Result:

{"fqdn":"pbuild","cn":"pbuild","uuid":"969ecab2-93d8-4322-a8cf-6314457053bb","addrs":[{"addr":"192.168.16.138","family":4,$

Example

List All Hosts

# pbdbutil -P --svc -L

Result:

{
"hostid": 1,
"cn": "pbuild",
"uuid": "969ecab2-93d8-4322-a8cf-6314457053bb",
"fqdn": "pbuild",
"addrs": [
{
"family": 4,
"port": 24351,
"addr": "192.168.16.138"
}
],
"tnlzone": 0,
"updated": 1465897394,
"deleted": 0
}
{
"hostid": 4,
"cn": "pbtest",
"uuid": "969ecab2-93d8-4322-a8cf-6314457053bf",
"fqdn": "pbtest",
"addrs": [
{
"family": 4,
"port": 24351,
"addr": "192.168.16.184"
}
],
"tnlzone": 0,
"updated": 1465898703,
"deleted": 0
}

Example

Add a Specified Host ("cn" Common Name and "uuid" Are Required)

# pbdbutil --svc -u '{ "cn" : "pbtest" , "uuid" : "969ecab2-93d8-4322-a8cf-6314457053bf" }'

Example

Add New Service Group

# pbdbutil --svc -u '{  "svcgname" : "foobar", "svc" : "logsvr" }'

Example

Add Host to Service Group

# pbdbutil --svc -u '{ "svcgname" : "foobar", "cn" : "pbtest" }'

Example

Delete Host

# pbdbutil --svc -d '{ "cn" : "pbtest" }'

Example

Add Host to Service Group as Primary Server

# pbdbutil --svc -u '{ "svcgname" : "foobar", "cn" : "pbtest", "role" : "primary" }'

Example

Delete Host When It Is a Primary

# pbdbutil --svc -d '{ "cn" : "pbtest" }'

4011.01 Host is a primary server. Please reassign primary before deleting host from service group, or use force on the $.

Example

Delete the Service Group

# pbdbutil --svc -d '{ "svcgname" : "foobar" }' --force

Example

Promote a Host That Is Currently a Secondary Server to a Primary Server

# pbdbutil --svc -p foobar pbtest

Management event options

These options provide methods to create, maintain, export, and import role-based policies into EPM-UL.

Usage

  • pbdbutil --evt [] [ ...]
  • -s { json param }: Search Management event records
  • Record entities: hostname, evtname, service, by, severity, before/after/then progname, version, arch, taxonomy

Records can be searched using the above entities and are matched as wildcards.

Example

-s '{ "taxonomy" : "chgmgt" } 'Display all Change Management Events``-s '{ "taxonomy" : "chgmgt", "hostname" : "host1" } ' Display all Change Management Events for host1

Description

<-S|--searchevt> { json parameters }This option provides a method of retrieving change management events from the change management database.

Example

Retrieve all change management events

-S '{ "taxonomy" : "chgmgt" }'
{"hostname" : "pbuild", "evtname" : "file_import", "service" : "pbdbutil9.0.0-01_debug", "who" : "ctaylor", "severity" : 16, "progname" : "pbdbutil9.0.0-01_debug", "version" : "9.0.0-01_debug", "arch" : "x86_64_ linuxA", "data" : {"msg" : "foo, bar", "fname" : "/opt/pbul/policies/pb.conf, conf","version" : 4, "sid" : 4995, "pid" : 31976, "uid" : 0}, "utc" : "2014-11-1109 : 19 : 28"}
{"hostname" : "pbuild", "evtname" : "tag_file", "service" : "pbdbutil9.0.0- 01_debug", "who" : "ctaylor", "severity" : 16, "progname" : "pbdbutil9.0.0- 01_debug", "version" : "9.0.0-01_debug", "arch" : "x86_64_linuxA", "data" :{"fname" : "/opt/pbul/policies/pb.conf", "tag" : "foo", "version" : -1, "sid" : 4995,"pid" : 31979, "uid" : 0}, "utc" : "2014-11-11 09 : 19 : 30"}

Example

Retrieve change management events for host1 only

-S '{ "taxonomy" : "chgmgt" , "hostname" : "host1" }'

REST keystore options

Usage

pbdbutil --rest [<options>] [ <file> <file> ...]
-lList all Application IDs in the database.
-d Delete Application key.
-g [--svcgname ] [ ...]Create new Application key with ACLs Specify svcgname to sync key across Service Group where acl is up to 8 regular expression strings in the form METHOD:/PATH/ATTRIBUTE where METHOD is GET, PUT, POST or DELETE.
Examples
GET:/events
PUT:/setting
/POST:/key
(GET|PUT):/setting/(submitmaster|acceptmasters)
-x Specify Application ID expiry

Database synchronization options

These options allow the interrogation of Database Synchronization status on primary servers.

Usage

pbdbutil --dbsync [<options>] [ <file> <file> ...]
-lList Database Synchronization history.
-l [<dbfile(s)>]List outstanding Database Synchronization entries.
-c <dbfile(s)>Deletes the _pblog entries from the specified database.
Each database that can be synchronized (FIM, Sudo, RBP, etc) has a _pblog table used to synchronize data from the primary to the secondaries. When adding a FIM configuration, or a new role, or a pbsudo host, then the corresponding INSERT or UPDATE SQL is added in the _pblog table.
-R []Initiates a synchronize on database immediately even if there is no change, for specified service.
    --forceForce synchronize the cfg files for the specified service.
-A <...>Set databases in Service Group(s) as being automatically synchronized.
-X <...>Unset databases in Service Group(s) as being automatically synchronized.

Registry Name Service Cache Options

Each host has a Registry Name Service Cache that holds the Service Group information that is applicable to them.

These options allow the retrieval of information and options to re-initialize the Registry Name Service Cache database.

Usage

pbdbutil --scache [<options>] [ <file> <file> ...]
--cnRetrieve Common Name from the Registry Name Service.
-wRetrieve my Registry Name Service information.
-lList all the locally cached Registry Name Service entries.
-s <[-|+]attribute>Sort the list of records by attribute name (asc/desc).
-RRefresh the local Registry Name Service cache.
    --allRefresh all hosts registered to Registry Name service using REST services.
     --host(s) [... ]Refresh on listed hosts using REST services.
-N { param }Create and initialize the Primary Registry Name cache database
where the { param } argument is formatted JSON with parameters:
  • "hostname" : "host1": hostname of the Registry Manager REST service
  • "port" : 24351: port of the Registry Manager REST service
  • "appid" : "appid": appid of the Registry Manager REST service
  • "appkey" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx": appkey of the Registry Manager REST service
-m Specify message. Required when change management enabled.

Elasticsearch credential management

The pbdbutil settings outlined here support Elasticsearch credential management.

The options available with the pbdbutil tool are also available in the EPM-UL REST API.

ℹ️

Note

For more information, see Elasticsearch Logstash API Calls.

Usage

pbdbutil --elkcred [<options>]
--elkcred -g Retrieves a credential by ID. The credential is output in JSON format. Use -P to make the output more readable.
The REST API call: elkcred -X GET
-s '{ "id": "", ... }'Adds a credential. The response is OK if the credential is set successfully; otherwise, a relevant error message is displayed.
The REST API call: elkcred -X PUT
-d Deletes a credential. The response is OK if the credential is deleted successfully; otherwise, a relevant error message is displayed.
The REST API call: elkcred -X DELETE
-lLists all credentials. The credential is output in JSON format. Use -P for more readable output.
The REST API call: elkcreds -X GET
-t Tests an existing credential. Test results are shown in JSON format. Use -P for more readable output.
Tests of a token or apikey credential fail against Logstash instances.
The REST API call: elkcredtest -X GET
-t '{ "id": "", ... }'Tests a prospective credential with the values currently in /etc/pb.settings (e.g., elkinstances), use the JSON fields relevant to the credential type.
For more information on credential types, see Credential Store.
The REST API call: elkcredtest -X POST.
To test a credential independently of /etc/pb.settings, add the elkinstances JSON attribute. See Test a credential for the example code snippet.
The REST API call: elkcredtest -X POST

Test a credential

To test a credential independently of /etc/pb.settings, add the elkinstances JSON attribute, as shown here:

Example

# pbdbutil --elkcred -t '{"id": "elastic_token", "type": "token", "username": "jeff", \
"password": "<password>", "endpoint": "/_security/oauth2/token", \
"elkinstances": "elasticsearch=https://elksite.us-east-1.aws.found.io"}' -P
{
   "results": [
      {
         "token-request": {
            "url": "https://elksite.us-east-1.aws.found.io/_security/oauth2/token",
            "curlcode": "0 (No error)",
            "httpcode": "200 (OK)"
         },
         "test-request": {
            "url": "https://elksite.us-east-1.aws.found.io/?pretty",
            "curlcode": "0 (No error)",
            "httpcode": "200 (OK)"
         }
      }
   ]
}

The format of the elkinstances value is the same as it would be in /etc/pb.settings.

Use -P to make the output more readable. As is the case with an existing credential, an attempt to test a prospective credential of type token or apikey against a Logstash instance fails.

poldbg

ℹ️

Note

These options are not applicable to EPM-L.

Description

Policy language debugging can be enabled, disabled, and reviewed using the poldbg option.

With this command:

  • List policy debugging entries to identify and resolve issues that may have occurred in a policy.
  • Specify users whose policy is debugged, and specify the amount of time that debugging is enabled for that user and policy.
  • Run pbrun command and review the debugging information.

ℹ️

Note

Policy debugging is only available for if statements and switch case statements.

Syntax

Run to list debugging policy entries.

--poldbg -l

Run to identity users who can debug entries. You can also designate how long the user has access.

--poldbg -u

Run to view and print a clean output of events for policy debugging in JSON-equivalent format.

pbadmin -P --evt -s '{taxonomy" : policydbg" }'

Run to view and print events for policy debugging in a CSV-type format.

pbadmin -C --evt -s '{taxonomy" : policydbg" }'

Example

pbadmin --poldbg -u rjones 2h

In this example, the user rjones is specifically allowed to debugging access for two hours.

Example

pbadmin -C --evt -s '{taxonomy" : policydbg", "rowid" : 3 }'

In this example, the events are going to be provided in a CSV-type format in which the information specifically in row three is expanded.

Integrated product options

These options provide options to configure the Integrated Products Queue database.

Usage

pbdbutil --intprod [<options>] [ <file> <file> ...]
-lList all entries in Integrated Product database queue.
-d Delete entries from Integrated Product database queue.

Policy and log caching options

These options support the policy and log caching feature introduced in EPM-UL version 23.1.

Usage

pbdbutil --remotecache [<options>]

Options supported on a client

--forwardForward cached write queue and IO log files to the log server
--pullRetrieve policy from a cached policy server

Options supported on a policy server

--list-versionsList policy versions for clients that use cached policies from the cached policy server

Example

List client policy versions in a human-friendly format.

pbdbutil --remotecache --list-versions -P

I/O logfile queue options

These options allow users to maintain the database that queues the I/O logfile names for indexing to ElasticSearch.

Usage

pbdbutil --iologidx[<options>]
-lList queued iolog files.
-d Delete queued iolog files.

When an iolog is started, pblogd (or pbmasterd) adds that iolog to the logfile queue with a pblogd_status of started and retry set to never. When the iolog file is closed in a normal fashion, the pblogd_status is set to finished. During the time that pblogd is active, it periodically sends a heartbeat.

When an iolog is not properly closed (pbrun killed or network issues, for example), the heartbeat is used with the iologactionqueuetimelimit keyword to artificially set the pblogd_status to finished, so that iolog can be processed for ElasticSearch or iologcloseaction.

When an iolog is being processed for ElasticSearch or iologcloseaction, the proc_status is set to processing. When ElasticSearch or iologcloseaction has successfully completed, the proc_status is set to finished. When ElasticSearch reports a recoverable error, or iologcloseaction returns -1, the iolog is re-queued by setting lastupdated to now, setting retry (now + iologactionretry minutes), and incrementing the retries.

Example

Delete all queued I/O log file names

pbdbutil –-iologidx -d \*

I/O logfile cache options

These options allow users to maintain the database that caches the I/O logfile names for use with BeyondInsight for Unix & Linux.

Usage

pbdbutil --iocache [<options>]

Display cached list of I/O log files:

--lstcache=['{ param… }']Use equals symbol (=) for optional parameter.
| -S['{ param… }']No space between switch name and optional parameter.
-s <[-|+]attributes>Sort the list of records by attribute name (asc/desc).

Remove I/O log file entries from the logfile cache database:

-d '{param…}']

Where the { param… } argument is formatted JSON parameters:

  • {"path":"pattern"}: glob wildcard for logfile path
  • {"loghost":"host1"}: Filter by loghost name
  • {"submithost":"host2"}: Filter by submithost name
  • {"runhost":"host3"}: Filter by runhost name
  • {" submituser":"user1"}: Filter by submituser name
  • {"runuser":"user2"}: Filter by runuser name
  • {"runcmd":"command"}: Filter by run command
  • {"from":""}: Filter I/O logs created on or after this date/time
  • {"to":"<yyyy-mm-dd HH:MM"}: Filter I/O logs created on or before this date/time
  • {"start":}: Specify record offset (number) when limiting output
  • {"len":}: Specify number of rows when limiting output

Migrate I/O log location cache database (Upgrades only):

-n [--force]

Migrates pre-v10.3.1 I O log location cache database to the new database configuration.

Migration is automatically done during an upgrade via pbinstall. Running this manually is typically not necessary unless circumstances prevented the automatic migration during the upgrade. The optional --force skips backup of the original/obsolete I/O log cache database if it already has been backed up by other methods.

Where the { param } argument is formatted JSON with parameters:

  • "path":"pattern": glob wildcard for logfile path
  • "loghost":"host2": loghost name
  • "submithost":"host1": Filter by submithost name
  • "runhost":"host1": Filter by runhost name
  • "submituser":"user1": Filter by submituser name
  • "runuser":"user1": Filter by submituser name
  • "runcmd":"cmd": Filter by runcmd name
  • "from":"": Filter by logfiles opened on or after this date/time
  • "to":" HH:MM": Filter by logfiles opened on or before this date/time
  • "start":: Specify record offset (number) when limiting output
  • "len":: Specify number of rows when limiting output

File Integrity Monitor options

These options provide maintenance for the File Integrity Monitor database, and options for the client to run an integrity check.

Usage

pbdbutil --fim [<options>] [ <file> <file> ...]

Options for FIM client

-rRun FIM check.
-URun FIM check and update database.

Options for FIM server database management

-nCreate new FIM database.
-lList all FIM configurations in database.
-lAdd an extra -l to list host assignments.
-s <[-|+]attribute>Sort the list of records by attribute name (asc/desc).
-i Import FIM configuration file.
-e Export specified FIM configuration.
-g Get FIM configuration by name.
-d Delete FIM configuration.
-d { "cfg" : { "name" : "" }}Delete FIM configuration matching wildcard.
-u { "name" : "", "cfg": { json param... }}Update FIM configuration.
-A <host(s)>Assign host to configuration.
-X <host(s)>Unassign host from configuration.
-g { "rpt" : { "uuid" : "" }}Get specified FIM report.
-g { "rpt" : { params ... }}Retrieve report summarized from multiple reports. See below for attributes.
--format '[ "header", "header2", ... ]'Define retrieved fields when using CSV report.
-d { "rpt" : { "uuid" : "" }}Delete FIM report.
-d { "rpt" : { params ... }}Delete FIM report(s) - see below for attributes.
-L [{ Retrieve, List or Delete FIM reports, with attributes:
["name" : "",]
["uuid" : "",]
["host" : "",]
["older" : ,]["newer" : <epoch>,]
["older" : { "years" : n, "months" : n, "days" : n, "hours" : n ]
["newer" : { "years" : n, "months" : n, "days" : n, "hours" : n ]
["updates" : ,]
["risk" : ,]
["risk_higher" : ,]
["risk_lower" : ,]
["regexp" : true]}
 
-s <[-|+]attribute>Sort the list of records by attribute name (asc/desc).

Event logfile cache options

These options allow users to query and maintain the database that caches the event logfile names for use with BeyondInsight for Unix & Linux.

Usage

pbdbutil --evtcache [<options>]

Display cached list of event log files:

--lstcache=['{param…}']Use equals sign (=) for optional parameter.
| -S['{param…}']No space between switch name and optional parameter.
-s <[-|+]attribute>Sort the list of records by attribute name (asc/desc).

Where the { param } argument is formatted JSON parameters:

  • {"path":""}: glob wildcard for logfile path
  • {"runhost":""}: Filter by runhost name
  • {"loghost":""}: Filter by loghost name
  • {"from":""}: Filter by event logs active on or after this date/time
  • {"to":"<yyyy-mm-dd HH:MM"}: Filter event logs active on or before this date/time
  • {"start":}: Specify record offset (number) when limiting output
  • {"len":}: Specify number of rows when limiting output

Remove event log file entries from the logfile cache database:

-d '{param…}'

Where the { param… } argument is formatted JSON parameters:

  • {"path":"pattern"}: glob wildcard for logfile path
  • {"loghost":"host2"}: Filter by loghost name
  • {"from":""}: Filter event logs active on or after this date/time
  • {"to":"<yyyy-mm-dd HH:MM"}: Filter event logs active on or before this date/time

Policy and log caching options

These options support the policy and log caching feature introduced in EPM-UL version 23.1.

Usage

pbdbutil --remotecache [<options>]

Options supported on a client

--forwardForward cached write queue and IO log files to the log server
--pullRetrieve policy from a cached policy server

Options supported on a policy server

--list-versionsList policy versions for clients that use cached policies from the cached policy server

Example

List client policy versions in a human-friendly format.

pbdbutil --remotecache --list-versions -P

Write queue status options

Starting in EPM-UL 22.3, report on and summarize the content of write queue files using new options added to the pbadmin command. The files are created when the message router is offline or when write queue records cannot be written to a log server’s event log.

Usage

pbadmin --wqstatus [<options>]

Options

-l <file(s)>Provides a high-level summary of the contents of one or more write queue files.
Data reported by the command includes:

- file: name of the file being summarized.
- created: file creation date, taken from the file header.
- count: number of records in the file.-
- completed: number of file records for which processing has completed.
- pending: number of file records for which processing is pending.
- notprocessed: number of file records not yet processed.
-ll <file(s)>Provides more detailed report on the contents of one or more write queue files.
Additional top-level fields associated with the -ll option include:
  • numaccept: number of Accept event records within the file.
  • numreject: number of Reject event records within the file.
  • numfinish: number of Finish event records within the file.
  • numkeystroke: number of Keystroke event records within the file.
  • numiologclose: number of iolog close action records within the file.
  • numiologcache: number of iolog cache records within the file.
  • records: precedes an array of detail items associated with every record in the file.
Within the records array, the following data is displayed for each record:
  • type: string representation of record type field obtained from the record header.
  • length: record length obtained from the record header.
  • wqstatus: this is derived from the mark field passed in the record header. A value of 0 means not processed, a value of UINT32_MAX indicates completed, and any other value indicates pending.
  • event: this is displayed only for event records and is obtained from the record body.
  • uniqueid: the unique ID of the record or its associated event, also obtained from the record body.
  • timestamp: the record time resolved to the second, also obtained from the record body.
\
-TProvides a summary of the write queue files stored in the directory specified by the settings value writequeuepath.
-P, --prettyOptional. Produces pretty print.
-hHelp on write queue status options.

Examples

Example

pbdbutil --wqstatus -l

[root@dev-test ~]# pbdbutil --wqstatus -l /opt/pbul/msgrouter/wq_0003 -P
[
   {
      "file": "/opt/pbul/msgrouter/wq_0003",
      "created": "2022-09-02 14:01:22",
      "count": 2,
      "completed": 0,
      "pending": 0,
      "notprocessed": 2
   }
]

Example

pbdbutil –wqstatus -ll

[root@dev-test ~]# pbdbutil --wqstatus -ll /opt/pbul/msgrouter/wq_0003 -P
[
   {
      "file": "/opt/pbul/msgrouter/wq_0003",
      "created": "2022-09-02 14:01:22",
      "count": 2,
      "completed": 0,
      "pending": 0,
      "notprocessed": 2,
      "numaccept": 1,
      "numreject": 0,
      "numfinish": 1,
      "numkeystroke": 0,
      "numiologclose": 0,
      "numiologcache": 0,
      "records": [
         {
            "type": "event log",
            "length": 686,
            "wqstatus": "notprocessed",
            "event": "Finish",
            "uniqueid": "0a64a8e963120c883D37",
            "timestamp": "2022-09-02 14:00:52"
         },
         {
            "type": "event log",
            "length": 8615,
            "wqstatus": "notprocessed",
            "event": "Accept",
            "uniqueid": "0a64a8e963120ded3F1F",
            "timestamp": "2022-09-02 14:06:37"
         }
      ]
   }
]

Example

pbdbutil --wqstatus -T

[root@dev-test ~]# pbdbutil --wqstatus -T -P
{
   "files": 5,
   "records": 31,
   "completed": 0,
   "pending": 0,
   "notprocessed": 31,
   "numaccept": 19,
   "numreject": 0,
   "numfinish": 7,
   "numkeystroke": 0,
   "numiologclose": 3,
   "numiologcache": 2,
   "first": "2022-09-02 14:00:40",
   "last": "2022-09-02 14:36:31"
}

pbbench

The pbbench program tests installation and network configuration. If pbbench detects an error, an error message is printed to stdout. If no errors are detected, pbbench returns silently. pbbench generates a report that includes information about the tests that were performed, the results of the tests, and any errors that were encountered.

pbbench checks for very old versions of EPM-UL (prior to v2.0) by looking for /etc/pb.ports and /etc/pb.masters and reports a warning if these are found. The HTML GUI version of pbbench does not check for the EPM-UL pre-v2 files.

You can use the --skip-* options (such as --skip-inetd and --skip-logs) to prevent pbbench from performing those tests. However, the --skip-logs, --skip-gui, and --skip-sync options do not prevent pbbench from testing the connections to those hosts. To suppress the connection tests to these hosts, you must specify the --skip-connect option as well. This option suppresses connection tests for all host types.

To conduct connection tests only, use the -l (for log host connection tests) or -m (for policy server host connection tests) options. These options can be specified individually or together, for a single specified host name or IP address, or for all configured log hosts or policy server hosts. For both of these options, current output messages are skipped, and a single message is issued to stdout containing the version of the connected EPM-UL daemon (or connection failed). The exit status is zero if the specified host (or every configured policy server/log host) is successfully contacted. The exit status is non-zero if any policy server/log host cannot be contacted.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pbbench [options]
    -e, --stderr
    -E, --errors
    -l, --logServerTest=[host_name|IP_address|SRV lookup|\`external program\`]
    -m,--masterServerTest=[host_name|IP_address|SRV lookup|\`external program\`]
    -V, --verbose
        --no-timeouts
        --skip-connect
        --skip-inetd
        --skip-old
        --skip-logs
        --skip-gui
        --skip-path
        --skip-shells
    --skip-sync
pbbench –v | --version
pbbench --help

Arguments

-e, --stderrOptional. Send all output to stderr.
-E, --errorOptional. Treat warnings as errors
-l,

--logServerTest=[host_name |IP_address|SRV lookup|"`external program`"]
Optional. Bypasses all existing tests and performs only the log host connection test on the specified host_name or IP_address. If the host_name or IP_ address is not specified, the connection test is performed for all configured log hosts.
Successful connections reported when running pbbench -l from the policy server host tell you that the log server is available, and Accept/Reject events can be logged when optimized run mode is used.
Successful connections reported when running pbbench -l from the run host tell you if Accepts/Finish events can be logged via pblocald, and pblocald can perform I/O logging.
Successful connections reported when running pbbench -l from the submit host tell you that Finish events can be logged while in optimized run mode and I/O logging is possible while in optimized run mode.
Version 7.0 and later: option available.
-m,

--masterServerTest=[host_name|IP_address|SRV lookup|"`external program`"]
Optional. Bypasses all existing tests and performs only the policy server host connection test on the specified host_name or IP_address.
If the host_ name or IP_address is not specified, the connection test is performed for all configured policy server hosts.
Version 7.0 and later: option available.
-V, --verboseOptional. Verbose mode.
--no-timeoutsOptional. Disable connection test timeouts.
--skip-connectOptional. Disable connection tests for all host types.
--skip-inetdOptional. Disable superdaemon (inetd/xinetd) tests.
--skip-oldOptional. Disable checking of old constructs.
--skip-logsOptional. Disable log file tests.
--skip-guiOptional. Disable pbguid-related tests.
--skip-pathDisable path tests of executable files.
--skip-shellsDisable tests of /etc/shells.
--skip-syncOptional. Disable pbsync-related tests.
Version 5.0 and later: option available.
-v, --versionOptional. Display the pbbench version and exit.
--helpOptional. Display program help and usage information.

Files

  • /etc/inetd.conf
  • /opt/pbul/policies/pb.conf
  • /etc/pb.key
  • /etc/pb.masters
  • /etc/pb.ports
  • /etc/pb.settings
  • /etc/pbmasters
  • /etc/resolv.conf
  • /etc/services
  • /etc/syslog.conf
  • /etc/xinetd.conf DNS
  • mc NIS NIS+
  • PBexternal pbrun
  • SMF
    • Version 3.5 and earlier: Solaris SMF not supported.
    • Version 3.5.4 and later: Solaris SMF supported.

Example

Run pbbench redirect output to the file pbbench.output rather than standard error:

pbbench > pbbench.output

📘

For more information, see pbcheck, pbsync, pbsyncd.

pbcall

The pbcall program is used for two purposes. To test, on the local machine, what a given function call would do, and to allow an Endpoint Privilege Management for Unix and Linux policy language function to be executed from the command line.

Syntax

pbcall –policy-function-name args …

Arguments

-policy-function-nameRequired. The name of the policy function.
argsOptional. The arguments to the function.

Files

None

Example

Using the stat() function:

pbcall –stat /etc

This command returns, on the screen, the results of a call to the stat call. Using this program from an EPM-UL session, you can execute a command such as:

list = system("/usr/local/bin/pbrun –h "+submithost+
" /usr/local/bin/pbcall –stat /etc");
statresult = split(list,",");

This command gives the same results as:

statresult = stat("/etc")

except that it is executed on the local machine as opposed to the policy server host. Multiple EPM-UL functions can be called at the one time:

pbcall –gethome user1 –getname user1

The output is put on different lines.

Lists need to be specified within quotation marks. For example:

pbcall –search "{a,b,c}" a

Strings can be quoted using single quotation marks or double quotation marks.

pbcheck

The pbcheck program processes a policy file and produces a report of syntax or language problems, or an entitlement report. The policy server daemon (pbmasterd) reports any policy file errors to a log file; however, pbcheck should be used to detect errors before you install a policy file on a live system.

With no options, pbcheck performs a run-check on the policy file that is specified in your settings file.

ℹ️

Note

The -c option to check licenses has been retired. Use pbadmin --lic -l for this purpose.

With the -e option, pbcheck produces an entitlement report in CSV format. The output data contains the columns submithost, user, command, argv, runhost, runuser, runcommand, and runargv. When a field has no value, the entitlement report displays an empty string for that field.

The policy file must first be syntactically correct, so you should run pbcheck to check the policy syntax before running pbcheck -e. Because pbcheck -e processes the policy without arguments, you should ensure that the logic of the policy works even if no argument is passed to it.

With the -U, -C, or -H options, pbcheck produces a formatted text entitlement report that is sorted by user, command, or host, respectively. If more than one of these options is specified, then each of the reports is produced, one after the other. Using the -x or --csv2 option, you can export the entitlement data to Microsoft® Excel CSV format.

In CSV format, the resulting data is presented as comma-separated values and contains ASCII-formatted information for the following (in this order):

  • Submit host
  • User
  • Command
  • Argv
  • Accept/reject/error text
  • Run host
  • Run user
  • Run command
  • Run argv
  • Iolog (yes/no): Not displayed when detail level is low
  • Policy file name: Not displayed when detail level is low
  • Policy line number: Not displayed when detail level is low
  • Policy Server host: Displayed only when detail level is high
  • Dependencies: Displayed only when detail level is high
  • Constraints: Semi-colon separated. Displayed only when detail level is high

The fields displayed in this format are displayed as empty quotation marks ("") if they were not specified in the policy; this means they could be any value.

If a field contains Can not evaluate soft … expression in the output, it means the policy was setting the corresponding variable to a value that can be evaluated only at runtime (when running pbrun), such as argv, date, time, and so on.

With the option -H, each submit host is displayed on the top, followed by as many lines as necessary containing the other fields in the same order as above (except the submit host field).

Example

Host: <submithost>
<submitUser> <command> <argv> <Accept/Reject/Error Text> <runHost> <runUser>
   <runCommand> <runArgv> <iolog> <policyName> <policyLineNumber> <masterHost>
   <dependency> <constraints>

With the option -U, each user is displayed on the top, followed by as many lines as necessary containing the other fields in the same order as above (except the user field).

Example

User: <user>
<submitHost> <command> <argv> <Accept/Reject/Error Text> <runHost> <runUser>
   <runCommand> <runArgv> <iolog> <policyName> <policyLineNumber> <masterHost>
   <dependency> <constraints>

With the option -C, each command is displayed on the top, followed by as many lines as necessary containing the other fields in the same order as above (except the command field).

Example

Command: <command>
<submitHost> <submitUser> <argv> <Accept/Reject/Error Text> <runHost>
   <runUser> <runCommand> <runArgv> <iolog> <policyName> <policyLineNumber>
   <masterHost> <dependency> <constraints>

The fields displayed in -H, -U, and -C are displayed as if they were not specified in the policy, and means they could have any value.

The fields iolog, policyname, and policyLineNumber are not displayed if detail level is low, and the fields masterhost, dependency, and constraints are displayed only when detail level is high.

The entitlement report mechanism uses a temporary work file before creating the final report. This temporary file is created in the $TMPDIR directory. If the TMPDIR environment variable is not set (or is set to /tmp/), the workfile is written in the /tmp directory.

ℹ️

Note

Temporary files that are owned by root in /tmp are a potential vulnerability. We recommend you set TMPDIR=/var or some other appropriate directory where normal users do not have write access.

Policies that use looping constructs which modify the iterating variable within the loop do not work correctly. Policies that test the contents of argv or runargv may produce incomplete results.

Policies that use data that is known only at an actual run-time (such as the date and argv variables) produce incomplete results. In these cases, warnings and errors use the term soft when referring to variables that cannot be fully evaluated.

If a policy contains conditions that are based on external data sources or on external files that are generated at run time, the entitlements are evaluated as if the conditions are true. The last column (displayed when the --detail option is set to High), Constraint, shows that each row is displayed when a condition is accepted. For example, if the policy checks whether a user belongs to a certain netgroup before accepting the command, the report shows the command for this user as accepted; the Constraint field shows the condition that the user belongs to the netgroup. At runtime, a particular user listed in the report might actually not be part of that netgroup, and therefore gets rejected.

The constraint option enables you to limit the report by using any valid EPM-UL policy language expression.

Example

-c "user=='dba'" -c "host in {'A', 'B'}"

This limits the report to dba privileges on hosts A and B.

Most user defined functions are not properly processed for entitlement reporting.

pbcheck evaluates a limited set of functions in a constraint when those functions are used against the output variables submithost, user, command, runhost, runuser, and runcommand. The supported functions are basename(), tolower(), and toupper().

Examples of constraints whose function calls are evaluated are:

  • basename(command) in Allowed_Cmds
  • tolower(user) in Allowed_Users
  • toupper(submithost) in Allowed_Hosts

All other functions are not evaluated, and do not show actual values for the affected output field.

Example

The following policy does not produce specific values in the command field:

gsub("^.*/", "", command) in Allowed_Cmds

It does, however, insert that whole constraint in the command field for informational purposes.

ℹ️

Note

The -b (--nobasename) option for pbcheck has been deprecated because pbcheck now evaluates the basename() function.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pbcheck [options] [command [arguments]]
   -f, --file=file_name
   -h, --host=host_name
   -r, --run
   -s, --syntax
   -t, --type
   -x, --csv2
   -p, --policydir=directory
   -L, --showlists[=listname [,listname]...]
   -S, --showduplicates
pbcheck [options] [-c constraint [-c constraint]...] [command [arguments]]
   -f, --file=file_name
   -p, --policydir=directory
      -e,--entitlement [=abridged|standard|extended| exhaustive]
      -b, --nobasename
      -l, --uselistnames[=columnname[,columnname]...]
   --maxchildren <number>
   --maxloopchildren <number>
   -U, --user_report
   -H, --host_report
   -C, --command_report
   -D, --detail[=low|medium|high]
   -d, --display_headers
   -A, --accepted
   -R, --rejected
   -I, --rejected_implicit
   -c, --constraint=expression
   -x, --csv2
pbcheck -v | --version
pbcheck --help

Arguments

-A, --acceptedOptional. For entitlement reporting only. Report accepted commands (default).
May be combined with -I and -R.
Version 5.0 and later: option available.
-b, --nobasenameObsolete. Optional. For entitlement reporting only. Remove basename function calls from the entitlement report, leaving only the command or runcommand.
Version 6.2.3 and later: option deprecated.
This is the built-in default behavior of pbcheck.
-c, --constraint =expressionOptional. Restrict the entitlement report to items that match the expression (for example, -c "user=='root'").
Version 5.0 and later: option available.
-C, --command_reportOptional. Produce a formatted entitlement report in command sequence.
Version 5.0 and later: option available.
-d, --display_headersOptional. Display the field headers as the top of an entitlement report.
Version 6.0.1 and later: option available.
-D, --detail [=low|medium|high]Optional. Produce the specified level of detail.
Version 5.0 and later: option available.
-e, -entitlement [=abridged|standard| extended|exhaustive]Optional. Produce entitlement data in CSV format. The optional arguments are:
abridged: Simplest and fastest method. It ignores the interactions between different if statements and groups similar data (for example, users or hosts) during evaluation.
standard (default): Slower and more detailed method. It tracks the interactions between different conditionals.
extended: Method providing more detail. It tracks interactions between different conditionals and evaluates the policy for each member of a list, rather than treating the list as a group.
exhaustive: Method providing more detail. The output is currently the same as extended, but may be changed in the future.
Version 5.0 and later: option available.
-f, --file=file_nameOptional. The file name to check. Defaults to the normal policy file.
-h, --host=host_nameOptional. Simulate a check with a remote host name.
-H, --host_reportOptional. Produce a formatted entitlement report in host sequence.
Version 5.0 and later: option available.
-I, --rejected_implicitOptional. For entitlement reporting only. Report commands that are implicitly rejected at the end of the policy. May be combined with -A and -R.
Version 5.0 and later: option available.
-l, --uselistnames [=column_name [,column_name]...]Optional. For entitlement reporting only. Replace the list values with the name of the list variable for all fields or for specific fields. Valid field names are submitHost, submitUser, command, runHost, runUser, and runCommand. When specifying multiple field names, enter them as comma-separated values (no spaces). Omit the field name to replace all applicable fields with the list variable name.
Statements that act on individual items (for example, switch and case) cause the list to be expanded in the report, regardless of the -l option.
If the run variables runuser and runcommand are not explicitly set in the policy, their values will depend on the variables user and command.
For more information, see Policy Language Guide.
In such a case, the --uselistnames option applied to user and command fields (submitUser, command) automatically affect the output of their corresponding run variables (fields runUser and runCommand).
Similarly, if a policy has an explicit dependency for runhost on submithost, then the --uselistnames option applied to the submitHost field are also reflected in the runHost field.
Version 6.1 and later: option available.
-L, --showlists [listname [,listname]...]*Optional. Show members of all lists or of specific lists. Omit the list name to display members of all lists.
Version 6.2.3 and later: option available.
--maxchildren Limit the total number of live pbcheck descendant processes. After this limit is reached, the entire pbcheck process tree is terminated. This is a safety mechanism to prevent crippling a system with too many processes. The default value is 200.
Increasing the value should only be necessary for policies with a large number of if, case, or looping statements that do not result in an Accept or a Reject.
Version 6.2 and later: option available.
--maxloopchildren Limit the number of child processes that evaluate the same policy line (for example, an endless loop). After this limit is reached, the process that encounters the same line for the specified number of iterations issues a diagnostic message indicating the policy line and statement. Then the process exits. That child’s parent and all ancestors are free to continue processing, resulting in a possibly incomplete entitlement report. This is a safety mechanism to prevent crippling a system with too many processes. The default value is 25.
Version 6.2 and later: option available.
-p, --policydir =directoryOptional. Provide a policy directory to control include files in the configuration policy. If a file name in an include statement starts with a slash (/), then that file is used. Otherwise, the directory that is specified using the -p option is used to search for the file in the include statement.
-r, --run*Optional. Perform run-time checking (forces syntax and type checking).
-R, --rejectedOptional. For entitlement reporting only. Report commands that are rejected by an explicit Reject statement. May be combined with -A and -I.
Version 5.0 and later: option available.
-s, --syntaxOptional. Perform syntax checking.
-S, --showduplicatesOptional. Show information on lists with duplicate members.
Version 6.2.3 and later: option available.
-t, --typeOptional. Perform type checking (forces syntax checking).
-U, --user_reportOptional. Produce a formatted entitlement report in user sequence.
Version 5.0 and later: option available.
[command [arguments]]Optional. Search through the policy for the specified command and arguments to display whether it is accepted or rejected. The command and its arguments must be specified last in the pbcheck argument list.
If the pbcheck argument list includes options that Accept arguments, they must be specified before command.
-v, --versionOptional. Displays the version information on stderr and exits.
-x, --csv2Optional. Export entitlement data in Microsoft Excel CSV format.
Version 6.2.1 and later: option available.
--helpOptional. Displays the program’s help message and exits.

Files

EPM-UL policy file

Example

Perform a syntax check of the user-specified configuration file pb.mainconfig located in /etc

pbcheck –f /etc/pb.mainconfig

📘

For more information, see pbkey, pblocald, pbmasterd, pbpasswd, pbprint, pbreplay, pbsum.

pbencode

pbencode reads a file and encrypts it using the encryption key that is specified on the command line or in the settings file. The encrypted result is displayed on the standard output.

⚠️

Important

pbencode should be used only on files that are backed up. There is no way to decrypt a file after it has been encrypted.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pbencode [options]
   -f, -–file=file_name
   -E, --encryptiontype=policy|report|settings
pbencode –v | --version
pbencode –h | --help

Arguments

-f, --file=file_nameThe input file to encode. The default is the policy configuration file.
-E,
--encryptiontype=policy report|settings
The encryption type to use, based on the definition set in the settings file.
-v, --versionOptional. Print the pbencode version and exit.
-h, --helpOptional. Display the pbencode help message and exit.

Files

The files used may appear on the command line.

Example

pbencode -f /opt/pbul/policies/pb.conf -E policy > /etc/pb.conf.enc

Encodes the policy file with the encryption type and key that is specified in the settings file and places the result in /etc/pb.conf.enc.

📘

For more information, see pbkey.

pbkey

The pbkey program generates an encryption key that is suitable for any of the Endpoint Privilege Management encryption algorithms and stores it in a file that is specified on the command line or in the settings file. If pbrun, pbmasterd, or pblocald find the file /etc/pb.key, then they use it to encrypt data that is sent to the other programs.

If encryption is used, then the EPM-UL programs use the key that is specified in the settings file to encrypt local data and network traffic.

For network traffic, the contents of this file must be the same on all machines that are running EPM-UL for requests to execute. The file should be owned by root and have permissions set so that only root can read or write the file.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
  • Version 8.5 and later: -F option added.
pbkey [options]
    -f, --keyfile=key_file_name
-F, --seckeyfile=key_file_name
pbkey –v | --version
pbkey –h | --help

Arguments

ArgumentDescription
f, --keyfile=key_file_nameOptional. The name of the key file to create. The default is the value that is specified in the settings file or /etc/pb.key.
-F --seckeyfile=key_file_nameOptional. The name of the new high security key file to create. This -F --seckeyfile=key_file_name key file format must be used when enhanced security is required. Available in v8.5 or later.
-v, --versionOptional. Displays the pbkey version and exits.
-h, --helpOptional. Displays the program's help message and exits.

Files

key_file_nameThe resulting key file.

Example

Executing the command generates a new key and puts it into the file /etc/pb.key:

pbkey /etc/pb.key

📘

For more information, see pbcheck, pblocald, pbmasterd, pbpasswd, pbreplay, pbsum.

pbless

Version 4.0.0 and later: pbless setting available.

The pbless pager is similar to the less pager. It has been modified so that it can be used securely with the Endpoint Privilege Management for Unix and Linux programs. Security is enhanced by the following features:

  • pbless must be started with a full path name specified for the file to be read.
  • The user cannot access any files other than the one that is specified at startup time.
  • The user is not allowed to spawn any processes.

This program, when used in conjunction with Endpoint Privilege Management for Unix and Linux, allows users to access a specific file as root but not to access other root functions.

Syntax

pbless fullpathname

Arguments

fullpathname

File to display

Files

None

Example

Display the contents of the file called filename:

pbless filename

📘

For more information, see pbrun.

pblocald

pblocald is the local daemon that runs programs, when instructed, by the appropriate policy server daemon. A socket-listener process (typically inetd, xinetd, Solaris SMF, or pblocald -d) starts pblocald. pblocald checks the command line arguments (-m or --accept_masters), the acceptmasters setting in the settings file, or the netgroup pbacceptmasters to determine the policy server hosts from which it accepts requests.

Requests from policy server daemons that are not in this list are refused. pblocald logs all diagnostic messages in the log file that is specified by the -e command line argument or by the pblocaldlog setting.

Changes that are made to the pb.settings file after the pblocald daemon is started will not affect the operation of the daemon. If you change the pb.settings file, then you must restart the daemon for the changes to take effect. If you do not restart the daemon, then the daemon continues to operate using a snapshot of the pb.settings file that was cached at the time the daemon was started.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pblocald [options]
   -a, --syslog_accepts
   -m, --accept_masters=host_list
   -d, --daemon
   -D, --debug=<level>
   -e, --error_log=log_file_name
   -f, --foreground
   -i, --info <argument placeholder characters>
   -p, --port=port_number
   -s, --syslog
   -V, --check_version
pblocald –v | --version
pblocald --help

Arguments

-a, --syslog_acceptsOptional. Records accepted tasks in the syslog. Version 6.2 and earlier: option not available. Version 7.0 and later: option available.
-m, --accept_masters=host_listOptional. A list of policy server hosts from which pblocald accepts secured task requests. The list can include hostnames, IP addresses, DNS SRV lookups, and external program specifications
-d, --daemonOptional. Runs as a standalone daemon instead of from inetd or xinetd. This mode listens to the port that is defined by the -p command line argument or in the localport setting.
-D, --debug=Generate debug trace logs in the same directory pointed to by pblocaldlog
Version 8.0 and later: option available.
-e, --error_log=log_file_nameOptional. Records diagnostic messages in the file logfile instead of using the settings file entry pblocald-log.
-f, --foregroundpblocald normally spawns a child process and dissociates from the job that it starts. Although this method is beneficial when running from inetd, xinetd, or the command line, it stops pblocald from running under the init daemon (from /etc/inittab). This option prevents pblocald from dissociating and allows it to run from the inittab.
-i -info On Linux and AIX, the pblocald process replaces the argument placeholder characters with the following information about the submitting request:
submitting user
submit host
pbrun's pid
runuser
runargv
The format is:
submituser@submithost pid runuser: runargv
This allows an administrator to use the ps command to view more information about the running pblocald processes.
This feature is not available on HP-UX and Solaris.
-p, --port=port_numberOptional. When running as a standalone daemon, listens to the provided port instead of the default.
-s, --syslogOptional. Sends error messages to syslog in addition to the diagnostic message file.
-s works only if /etc/syslog.conf is configured to have syslog process auth.err (or less severe) messages.
-V, --check_versionOptional. Records diagnostic messages if a connecting client version does not match the pbmasterd version.
-v, --versionOptional. Displays the program version and exit.
--helpOptional. Displays the program's help message and exit.

Files

The /etc/pb.settings file that contains a list of valid acceptmasters hosts.

📘

For more information, see pbcheck, pbkey, pbmasterd, pbpasswd, pbreplay, pbrun.

pblog

The pblog program selectively displays entries from an event log. Each time a job is accepted, rejected, or completed, or a keystroke action event occurs, an entry is appended to the event log file. The event log file is specified by the “authevt=” label in eventdestinations setting or the eventlog setting in the settings file, or by the eventlog variable in the EPM-UL policy file. By default, the eventlog variable is set to /var/log/pb.eventlog, /usr/log/pb.eventlog, /var/adm/pb.eventlog, or /usr/adm/pb.eventlog, depending on the operating system.

With no command line arguments, pblog reads and displays all entries in the default event log file. You can specify a different event log with the -f or --eventlog argument. You can specify a decryption key file with the -k or --keyfile argument.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pblog [options]
    -a, --accept_format=expression
    -c, --constraint=expression
    -d, --dump
    -e, --finish_format=expression
    -f, --eventlog=file name
     --db
        --ff
        --odbc
    -i, --keystroke_format=expression
    -k, --keyfilefile_name
    -l, --verbose
    -o, --dbout=file name>
    -O, --odbcout=<dsn>
       -D, --diff
    -p, --all_formats=expression
    -q, --quiet
    -r, --reject_format=expression
    -t, --tail
pblog –X|--xml [options]
    -c, --constraint=<expression>
    -F, --field_list=field_names
    -f, --eventlog=file_name
    -k, --keyfile=file_name
pblog –C|--csv[options]
    -c, --constraint=expression
    -F, --field_list=field_names
    -f, --eventlog=file_name
    -H, --csv_header
    -k, --keyfile=file_name
    -S, --csv_separator
pblog  -J, --json  
-P, --pretty
pblog –v|--version
pblog --help

Arguments

-a, --accept_format=expressionOptional. Format expression for Accept events.
-c, --constraint=expressionOptional if the expression is the last argument on the command line. Constrains entries according to the expression.
-C, --CSVOptional. Produces comma-separated value (CSV) output.
-d, --dumpOptional. Dumps entries as they are read.
-e, --finish_format=expressionOptional. Format expression for finish events.
-f, --eventlog=file_name
--db
--ff
--odbc
Optional. Alternate event log to report.
Optional. Alternate event log is a database.
Optional. Alternate event log is a flat file..
Optional. Alternate event log is a ODBC DSN.
-F, --field_list=field_namesOptional field list to be displayed for CSV and XML output. When specifying multiple field names, enter them as comma-separated values (no spaces).
-H, --csv_headerOptional. Produces a field-name header in CSV mode.
-i, --keystroke_format =expressionOptional. Format expression for keystroke action events.
-k, --keyfile=file_nameOptional. Name of the encryption key file.
The file_name specified needs to be listed as one of the keyfile in eventlogencryption keyword.
-l, --verboseOptional. Turns on verbose mode. Prints all variables, one per line.
-o, --dbout=file name>Optional. Copy missing records to database.
-O, --odbcout=
-D, --diff
Optional. Copy missing records to ODBC.
Optional. Report differences instead of copying.
-p, --all_formats=expressionOptional. Print format expression for all events.
-q, --quietOptional. Turns on quiet mode. Do not report expression errors (for example, undefined variables).
-r, --reject_format=expressionOptional. Format expression for Reject events.
-S, --csv_separatorOptional. Field separator for CSV mode (default is comma).
-t, --tailOptional. Tail mode. Loop and report new entries as they occur (forces dump mode).
-J --json
-P --pretty
Optional. Produces output in JSON format.
Optional. Pretty print.
-v, --versionOptional. Displays the pblog version and exits.
-X, --xmlOptional. Produces XML-formatted output.
--helpOptional. Displays the program help message and exit.

📘

For more information about syntax to specify multiple encryption algorithms and files, see eventlogencryption.

Default output expressions

Accept Dump:

sprintf('%s %s %s %s %s@%s -> %s@%s\\n\\t%s', uniqueid, event, date, time, user, submithost, runuser, runhost, join(runargv))

Reject Dump:

sprintf('%s %s %s %s %s@%s\\n\\t%s', uniqueid, event, date, time, user, submithost, join(argv))

End/Finish Dump:

sprintf('%s %s %s', uniqueid, event, exitstatus)

Accept:

sprintf('%s %s %s %s@%s -> %s@%s\\n\\t%s\\n\\t%s', event, date, time, user, submithost, runuser, runhost, join(runargv), exitstatus)

Reject:

sprintf('%s %s %s %s@%s\\n\\t%s', event, date, time, user, submithost, join(argv))

End/Finish:

sprintf('%s %s %s', uniqueid, event, exitstatus)

Keystroke:

sprintf('%s %s %s %s %s', event, keystrokestatus, keystrokedate, keystroketime, keystroke)

Read an event log

Example

If pb.settings file has:

#eventdestinations
eventlog /var/log/pb.eventlog

pblog with no arguments reads the flat file event log specified in the eventlog setting:

# pblog

Example

If pb.settings file has:

eventdestinations    authevt=db
eventlog    /var/log/pb.eventlog.db

pblog with no arguments reads the SQLite DB event log specified in the eventlog setting:

# pblog

Example

Read a SQLite DB event log whose path is specified in the event log setting:

# pblog

Example

Read a specific SQLite DB event log:

# pblog -f /path/to/mypb.eventlog.db --db

Example

Read a specific flat file event log

# pblog -f /path/to/mypb.eventlog.flat --ff

Example

Read an ODBC type event log:

# pblog -f  MyDSN --odbc

In this case, odbc.ini and odbcinidir files located in the directory specified in odbcinidir setting (default /etc/pbul/etc) will be read to get the connection information to the MySQL or Oracle database.

📘

For more information, see the default values listed in eventlog.

Copy event log records

If multiple targets for authorized events are defined in eventdestinations, or if you want to copy event log records from one event log file to another, the options -o (output to SQLite database) or -O (output to ODBC database) can be used. This only copies the event log records with a uniqueid that does not exist in the destination.

Example

Copy from a flat file to a SQLite database:

# pblog --ff -f /var/log/pb.eventlog.flat -o /var/log/pb.eventlog.db

Example

Copy records from a flat file to the ODBC database:

# pblog --ff -f /var/log/pb.eventlog.flat -O MyDSN

Where MyDSN is the ODBC Data Source Name whose connection information to the MySQL or Oracle database is configured in the odbc.ini/odbcinst.ini files (see odbcinidir setting).

Example

Copy records from a SQLite database to the ODBC database:

# pblog --db -f /var/log/pb.eventlog.db -O MyDSN

Where MyDSN is the ODBC Data Source Name whose connection information to the MySQL or Oracle database is configured in the odbc.ini/odbcinst.ini files.

📘

For more information, see odbcinidir.

Report difference between event log destinations:

If multiple event destinations were used, and you want to report on records that might be in one destination but not another, you can use -o, -O with -D option:

Example

Report differences between event log records in a flat file versus a SQLite database:

# pblog --ff -f /var/log/pb.eventlog.flat -o /var/log/pb.eventlog.db -D
uniqueid,etype,epoch
ac1420215df2ac3604C5,Reject,2020/02/20 13:08:06
ac1420215df2ac3604C7,Accept,2020/02/20 13:08:06
ac1420215df2ac3604C7,Finish,2020/02/20 13:08:54
ac1420215df2ac3704C9,Accept,2020/02/20 13:08:07
ac1420215df2ac3704C9,Finish,2020/02/20 13:08:55

Example

Report differences between event log records in a flat file versus a MySQL database:

# pblog --ff -f /var/log/pb.eventlog.flat -O MyDSN -D
uniqueid,etype,epoch
ac1420215df2ac3604C5,Reject,2020/02/20 13:08:06
ac1420215df2ac3604C7,Accept,2020/02/20 13:08:06
ac1420215df2ac3604C7,Finish,2020/02/20 13:08:54
ac1420215df2ac3704C9,Accept,2020/02/20 13:08:07
ac1420215df2ac3704C9,Finish,2020/02/20 13:08:55

Example

Report differences between event log records in a SQLite database versus an Oracle database:

# pblog --db -f /var/log/pb.eventlog.db -O oracle -D
uniqueid,etype,epoch
ac1420215df2ac6d04EC,Reject,2020/02/20 13:09:01
ac1420215df2ac6d04EE,Accept,2020/02/20 13:09:01
ac1420215df2ac6d04EE,Finish,2020/02/20 13:09:49
ac1420215df2ac6d04F1,Accept,2020/02/20 13:09:01
ac1420215df2ac6d04F1,Finish,2020/02/20 13:09:49

Dumping records in JSON format

Starting with v10.3.0, the option -J has been added to display the event log records in JSON format. Combine with -P to enhance readability.

Example

# pblog --db -f /var/log/pb.eventlog.db -J -P

📘

For more information, see pbmasterd.

pblogd

pblogd is the log server daemon that records event and I/O logs as directed by other Endpoint Privilege Management for Unix and Linux programs. A socket-listener process (typically inetd, xinetd, or pblogd -d) starts pblogd.

Changes that are made to the pb.settings file after the daemon is started do not affect the operation of the daemon. If you change the pb.settings file, then you must restart the daemon for the changes to take effect. If you do not restart the daemon, then the daemon continues to operate using a snapshot of the pb.settings file that is cached at the time the daemon is started.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pblogd [options]
   -a, --syslog_accepts
   -d, --daemon
   -D, --debug=<level>
   -e, --error_log=log_file_name
   -f, --foreground
   -i, --info <argument placeholder characters>
   -p, --port=port_number
   -r, --syslog_rejects
   -s, --syslog
pblogd –v | --version
pblogd --help

Arguments

-a, --syslog_acceptsOptional. Records accepted task requests in the syslog.
-d, --daemonOptional. Runs as stand-alone daemon instead of from inetd or xinetd. This mode listens to the port that is defined in the logdport setting or the -p command line argument.
-D,
--debug=
Optional. Generate debug trace logs in the same directory pointed to by pblogdlog.
Version 7.5 and earlier: option not available.
Version 8.0 and later: option available.
-e, --error_log=log_file_nameOptional. Records diagnostic messages in the file logfile.
-f, --foregroundOptional. Run in the foreground when using daemon mode.
-i, -info On Linux and AIX, the pblogd process replaces the argument placeholder characters with the following information about the submitting request:
submitting user
submit host
pbrun's pid
runuser
runargv
where is one of the following: accept, finish, reject, keystroke, open log, close log, write I/O log, mktemp, reconnect
The format is:
submituser@submithost pid runuser: runargv
This allows an administrator to use the ps command to view more information about the running pblogd processes.
This feature is not available on HP-UX and Solaris.
-p, --port=portOptional. When running as a stand-alone daemon, listens to the provided port instead of the default.
-r, --syslog_rejectsOptional. Records rejected task requests in the syslog (unless EPM-UL is configured with a log server).
-s, --syslogOptional. Records diagnostic messages in the syslog.
-s works only if /etc/syslog.conf is configured to have syslog process auth.err (or less severe) messages.
-v, --versionOptional. Displays the program version and exits.
--helpOptional. Displays the program help message and exits.

Files

/etc/pb.settingsEPM-UL settings file

📘

For more information, see pbcheck, pbkey, pbmasterd, pblocald, pbpasswd, pbreplay, pbrun, pbsum.

pblogarchive

  • Version 8.5 and earlier: pblogarchive not available.
  • Version 9.0 and later: pblogarchive available.

pblogarchive is the log archiving utility that can archive I/O logs and event logs from the original logserver onto an archive host.

It is installed on hosts configured as log servers and policy servers. It must be called from a host containing the event logs or I/O logs to be archived.

You must be logged in as root to use pblogarchive.

Syntax

pblogarchive [options]
   -e, --eventlog [filepathname]
   -E, --eventlogbase "<shell pattern>"
   -i, --iolog <filepathname>
   -I, --iologbase "<shell pattern>"
   -s, --serverinfo <archivehost>
   -l, --list[e|i]
pblogarchive -v | --version
pblogarchive -h | --help

Arguments

-eArchive the event log specified in the settings file.
Cannot be combined with the I/O log options (-i, -I).
--eventlog
[=filepathname]
Archive an event log. Provide the absolute file path name of the event log to archive. If file path name is omitted, pblogarchive determines the event log from the settings file.
Cannot be combined with the I/O log options (-i, -I).
-E, --eventlogbase
"shell_pattern"
Archive event log(s) matching the shell pattern. Shell pattern must be enclosed in quotes.
Cannot be combined with the I/O log options (-i, -I).
-i, --iolog
<filepathname>
Archive the specified I/O log.
Cannot be combined with the event log options (-e, -E).
-I, --iologbase
"shell_pattern"
Archive I/O log(s) matching the shell pattern. Shell pattern must be enclosed in quotes.
Cannot be combined with the event log options (-e, -E).
-s, --serverinfo
<archivehost>
Specify the name or IP address of the destination archive host. This overrides logarchivehost in pb.settings.
-l, --list[e|i]List logfile locations in the log tracking DB.
-le: Lists only event log information.
-li: Lists only I/O log information.
For event logs, displays the name of the original logserver, event log creation datetime in UTC, event log archive datetime in UTC(when the event log was first rotated), original event log path, current host where logfile is located/archived, and the current path name of the logfile.
For I/O logs, displays the name of the original logserver, I/O log creation datetime in UTC, uniqueid associated with the I/O log, I/O logfile sequence number if partitioned, original I/O log path, current host where logfile is located/archived, and the current path name of the logfile.

Example

Archives the event log named by the eventlog setting in pb.settings:

pblogarchive -e

Example

Archives a specific event log:

pblogarchive --eventlog=/var/log/my90pb.eventlog_20150512_161106

Example

Archive multiple event logs using a filename shell pattern:

pblogarchive -E "/var/log/my90pb.eventlog_2015*"

Example

Archive a specific I/O log:

pblogarchive -i /var/log/iolog/my90iolog.7ZSa1y

Example

Archive multiple I/O logs using a filename shell pattern:

pblogarchive -I "/var/log/iolog/my90iolog.7*"

Example

Archive an event log to a specific archive host (override settings file):

Example

List event log location as recorded by the log tracking database:

#pblogarchive -le

List of Event Logs:

Orig_Logserver,Date_Created_UTC,Date_Archived_UTC,Orig_Path,Current_Host,Current_Path

dev-erolnd-01.unix.ca.com,2015-05-2802:49:21,-,/var/log/ABCac90pb.eventlog,dev-erolnd-01.unix.ca.com,/var/log/ABCac90pb.eventlog

dev-erolnd-01.unix.ca.com,2015-05-28 02:48:00,2015-05-28
02:48:00,/var/log/ABCac90pb.eventlog,dev-erolnd-01.unix.ca.com,/var/log/ABCac90pb.eventlog_20150527_194800

dev-erolnd-01.unix.ca.com,2015-05-28 02:43:01,2015-05-28
02:44:34,/var/log/ABCac90pb.eventlog,dev-erolnd-01.unix.ca.com,/opt/ARCHIVELOGS3/eventlog/dev-erolnd-01.unix.ca.com/ABCac90pb.eventlog_20150527_194433

Example

List I/O log location as recorded by the log tracking database:

# pblogarchive -li

List of IO Logs:

Orig_Logserver,Date_Created_UTC,Unique_Id,Partial_Id,Orig_Path,Current_Host,Current_Path
dev-erolnd-01.unix.ca.com,2018-09-18 18:25:53,ac1420205ba1435717DE,1,/var/log/pbsudo/dev-eolog-08.unix.ca.com/pbsudo.iolog.kAWJLT,dev-erolnd-02.unix.ca.com,/opt/iolog/dev-eolog-08.unix.ca.com/testuser/20180918/pbsudo.iolog.kAWJLT.ac1420205ba1435717DE

pbmasterd

The policy server daemon, pbmasterd, is the EPM-UL decision-maker. pbmasterd receives secured task requests from pbrun, pbksh, and pbsh and evaluates them according to the policy that is written in the configuration file that is specified in the settings file or /opt/pbul/policies/pb.conf. If the request is accepted, then pbmasterd directs either the client or pblocald to run the request in a controlled account such as root.

Policy server daemons should reside on a secure machine and are started from a socket-listener process (typically inetd, xinetd, or pbmasterd).

pbmasterd expects to find the configuration file in the policyfile setting in the settings file (default /opt/pbul/policies/pb.conf) on the host where pbmasterd resides. There may be more than one policy server daemon on different hosts for redundancy or to serve multiple networks.

pbmasterd logs all diagnostic messages in a log file that is specified by the pbmasterdlog setting or the -e command line argument.

Changes that are made to the pb.settings file after the daemon is started do not affect the operation of the daemon. If you change the pb.settings file, then you must restart the daemon for the changes to take effect. If you do not restart the daemon, then the daemon continues to operate using a snapshot of the pb.settings file that was cached at the time the daemon was started.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pbmasterd [options]
   -a, --syslog_accepts
   -d, --daemon
   --disable_optimized_runmode
   -D, --debug=<level>
   -e, --error_log=log_file_name
   -f, --foreground
   -i, --info <argument placeholder characters>
   -p, --port=port
   -r, --syslog_rejects
   -s, --syslog
   -V, --check_version
pbmasterd –v | --version
pbmasterd --help

Arguments

-a, --syslog_acceptsOptional. Sends job accept messages to syslog (unless EPM-UL is configured with a log server).
-d, --daemonOptional. Runs as a standalone daemon instead of from inetd or xinetd. This mode listens to the port that is defined in the masterport setting or by the -p command line argument.
--disable_optimized_runmodeOptional. Disable pbrun optimization and use pblocald even when submit host and run host are the same.
Version 5.0 and later: option available.
-D, --debug=Generate debug trace logs in the same directory pointed to by pbmasterdlog.
Version 8.0 and later: option available.
-e, --error_log=log_file_nameOptional. Records diagnostic messages in the file logfile.
-f, --foregroundpbmasterd normally spawns a child process and dissociates from the job that starts it. Although this method is beneficial when running from inetd, xinetd, or the command line, it stops pbmasterd from running under the init daemon (from /etc/inittab). This switch prevents pbmasterd from dissociating and allows it to run from the inittab.
-i -info On Linux and AIX, the pbmasterd process replaces the argument placeholder characters with information about the submitting request. Prior to evaluating the policy, this includes the submitting user, submit host, pbrun's pid, the word EVALUATING, requestuser, requested argv. After evaluating the policy, this is changed to include submitting user, submit host, pbrun's pid, runuser, runargv.
This allows an administrator to use the ps command to view more information about the running pbmasterd processes.
This feature is not available on HP-UX and Solaris.
-p, --port=portOptional. When running as a standalone daemon, listen to the provided port instead of the default.
-r, --syslog_rejectsOptional. Sends job reject messages to syslog (unless EPM-UL is configured with a log server).
-s, --syslogOptional. Sends diagnostic messages to syslog.
-V, --check_versionOptional. Records diagnostic messages if the connecting client’s version does not match the pbmasterd version.
-v, --versionOptional. Displays the program's version and exits.
--helpOptional. Displays the program’s help message and exits.

Files

/opt/pbul/policies/pb.conf (EPM-UL configuration file.)

📘

For more information, see pbcheck, pbkey, pblocald, pbpasswd, pbprint, pbreplay, pbrun, pbsum, Enable Debug Trace Logging for pbsh and pbksh.

pbmg

Version 4.0.0 and later: pbmg setting available.

The pbmg editor is similar to the mg editor. mg is a small version of GNU emacs with GNU-style emacs key bindings. The pbmg version has been modified so that it can be used securely with the Endpoint Privilege Management for Unix and Linux programs. Security is enhanced by the following features:

  • pbmg must be started with a full path name specified for the file to be opened.
  • The user cannot access any files other than the one that is specified at startup time.
  • The user is not allowed to spawn any processes.

This program, when used with EPM-UL, allows users to access a specific file as root, but not other root functions or files.

Syntax

pbmg fullpathname

Arguments

fullpathnameFile to edit.

Files

None

Example

Displays the contents of the fullpathname file for editing.

pbmg fullpathname

📘

For more information, see pbrun.

pbnvi

Version 4.0.0 and later: pbnvi setting available.

The pbnvi editor is similar to the standard vi editor. It is modified so it can be used securely with the EPM-UL programs. The user cannot access any files other than the ones that are specified at startup time. The user is also not allowed to spawn any processes.

This program, when used with EPM-UL, can allow users to access a specific file as root, but not access other root functions or files.

The edited file is written back to the same path. If this path has been changed by an external process, then the file is written to the new location to which the path now refers. Whenever pbnvi is run from Endpoint Privilege Management for Unix and Linux, the arguments should be checked to ensure that the user could not change the path and introduce a security hole.

Syntax

pbnvi fullpathname

Arguments

fullpathnameFile to edit.

Files

None

Example

Display the contents of the fullpathname file for editing:

pbnvi fullpathname

📘

For more information, see pbrun.

pbpasswd

Version 10.3.0: pbpasswd deprecated. pbpasswd functionality is supported through the pbadmin program.

pbpasswd generates an encrypted password that can be used by the getstringpasswd() function in the configuration file. When you run pbpasswd, specify a password with the -i option or provide it on standard input. If standard input is a tty, then the program asks you to type the password twice; otherwise, it reads the raw password from standard input.

The program then writes the encrypted version of the password to the file that is specified by the -o option, or prints it on standard output.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pbpasswd [options]
   -i, --password=password
   -o, --output=filename
pbpasswd –v | --versions
pbpasswd --help

Arguments

-i, --password=passwordOptional. The password to encrypt.
-o, --output=filenameOptional. Writes the encrypted version of the password to the specified output file.
-vOptional. Displays the pbpasswd version and exits.
--helpDisplays the program help message and exits.

Files

None

Example

Encrypts the string FELIX and place the encrypted result in the file /tmp/pbpasswd.out:

pbpasswd –i FELIX –o /tmp/pbpasswd.out

Example

In this example, the string FELIX is hashed and displayed. The first line shows the command that was entered and the second line shows the hashed string.

pbpasswd –i FELIX
0123m68dg5.87

Example

This example prompts for a new password, encrypts it, and displays the result in the standard output. The first line shows the command tat was entered, and the next two lines prompt for the password and prompt for the password to be retyped. The final two lines display the result of the hashed string.

pbpasswd
Enter Password:
Retype Password:
The encrypted password is:
4567j68gf5.88

📘

For more information, see pbcheck, pbmasterd, pbrun.

pbping

  • Version 6.2 and earlier: pbping not available.
  • Version 7.0 and later: pbping available.

The pbping program is BeyondTrust Endpoint Privilege Management’s client connectivity health check utility. pbping, run from a policy server daemon, checks connectivity to licensed clients’ pblocald daemon. When run without options, pbping checks connectivity to all licensed clients.

Syntax

pbping [options]
   -h, --host host_name|IP_address
   --csv
pbping -v, --version
pbping --help

Arguments

-h, --host host_name|IP_addressChecks a single host by host name or IP address.
--csvProduces output in comma-separated values.
-v, --versionDisplays the program information and exits.
--helpDisplays the program help message and exits.

Files

None

Example

Checks the status of all client hosts and return the results in comma-separated values format:

pbping --csv

Example

Checks the status of host1:

pbping -h host1:

📘

For more information, see pbcheck, pblocald, pbmasterd.

pbprint

The pbprint program is used to format a configuration file. It reads the specified file and sends the formatted information to standard output. pbprint ignores incoming white space and places white space, indentation, and line breaks in the appropriate places. Except for line breaks that are added at the ends of statements, the program attempts to preserve line breaks from the original file as much as possible.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pbprint [options]
   -f, --input=file_name
pbprint –v | --version
pbprint --help

Arguments

-f, --input=Specifies the policy configuration file to use.
-v, --versionDisplays the program information and exit.
--helpDisplays the program help message and exit.

Files

None

Example

Print the policy file:

pbprint

ℹ️

Note

If the installation is prefixed and/or suffixed, then the prefixed and/or suffixed configuration file is printed.

Example

Print the policy file at the specified path:

pbprint -f <pathtofilename>

Example

Print the policy file at the specified path:

pbprint --input=<pathtofilename>

📘

For more information, see pbcheck.

pbregister

Registers an EPM-UL client or secondary server to the primary license server.

The command line utility provides a method of retrieving default configuration and required data files from the primary license server to aid the initial install of the service.

ℹ️

Note

Pbregister is primarily used by Endpoint Privilege Management for Unix and Linux installer. We highly recommend that its direct use should be made under the guidance of BeyondTrust Technical Support.

Syntax

  • Version 9.0 and earlier: pbregister options not supported.
  • Version 10.0.1 and later: pbregister options supported.

Usage

pbregister <options...>

Arguments

-a The REST Application ID generated on the primary license server. Required to authenticate against the remote REST service.
-k The REST Application Key generated on the primary license server. Required to authenticate against the remote REST service.
-n <hostname/address>The TCP/IP address/domain name to contact the primary license server REST service. This is required.
-p The TCP/IP port to contact the primary license server REST service. If not specified, default is 24351.
-c Path to the libcurl shared libraries supplied by Endpoint Privilege Management for Unix and Linux. Multiple libraries can be specified separated by a colon.
-s Path to the libcom_err and libssl shared libraries supplied by Endpoint Privilege Management for Unix and Linux. Multiple libraries can be specified separated by a colon.
-N The Registration Client Profile name, as defined in the primary license server database. If none is supplied the default profile is used.
-P The Endpoint Privilege Management for Unix and Linux prefix.
-S The Endpoint Privilege Management for Unix and Linux suffix.
-zSet this hosts name when registering with Registry Name Service.
-g '[{"svcgname" : "", "role" : "<primary|secondary|client>"},{...}]'Register this host as given roles within specified service groups.
-RRegister with the Primary Registry Name Service.
-CCreate simple x509 certificate.
-qRun the command in quiet mode. Displays minimal feedback, and will not interact.
-v--version

pbreplay

pbreplay replays the contents of an I/O log file for an active or completed session.

If you set the iolog variable to a unique path name in a policy file, then EPM-UL logs all of the input and output from the secured task to an I/O log file.

The input and output for the secured task can be logged to a file in /usr/adm with a file name, such as pb.jqpublic.ksh.a05998, that can be examined later using pbreplay. The name of the I/O log is a unique temporary file name that is generated by the logmktemp() function in the configuration file.

Example

This is an example of such a filename:

iolog=mktemp("/usr/adm/pb." + user + . + basename(command) +".XXXXXX");

ℹ️

Note

EPM-UL sets the permissions on the I/O log file so that only root can read the file. No other user can examine the contents of the I/O log files. You must be logged in as root to use pbreplay on these files. You can also use EPM-UL to delegate this privilege to the appropriate people.

Starting in version 9.4.0, when a user requests to replay an archived IO log, pbreplay makes a REST GET request for a copy of the archived logfile from the Log Archive Storage Server. The copy of the file is saved to a temporary file for use by pbreplay. When pbreplay exits, this temporary file is removed.

pbreplay has four main ways of replaying an iolog:

  • Interactively: The viewer interactively controls the speed of viewing the iolog.
  • Raw: The entire iolog is replayed at computer speed. The raw terminal control codes are interpreted by the terminal (resulting in visually correct output that is not easily searched via grep).
  • Processed: The entire iolog is replayed at computer speed. The terminal control codes are interpreted by pbreplay (resulting in output that is searchable).
  • Policy variables: The values of EPM-UL policy variables are printed.

Interactive syntax

pbreplay [ -ao | -ax ] [ -h ] [ -t <date format> ] <iolog filename>

Raw syntax

pbreplay <[ -I | -i | -o | -e ]> [ [-ao | -ax | -am ] ] [ -h ] [ -m ] [ -t <date format> ]

Processed syntax

pbreplay -O [--regex <regex expression> [--ignore-case ] [ -c <constraint expression> ] [ -p <format expression> ] ] <iolog filename>
pbreplay -O [--regex <regex expression> [--ignore-case ] [ -c <constraint expression> ] [ -p <format expression> ] --files <glob pattern>]

Solr or Elasticsearch indexing syntax

ℹ️

Note

As of version 23.1, Solr is deprecated. EPM-UL no longer supports installing Solr, but features that use an existing Solr installation will continue to work.

pbreplay -X [-T]
pbreplay -Z [-T]

Policy variable only syntax

pbreplay -av <iolog filename>

The -O option by itself produces searchable output by processing the terminal control codes in a virtual screen, then produces output based on that virtual screen. This feature is intended to search shell sessions delegated by pbrun, for shell command entries. Searching for data within a CURSES application is not supported. The goal of being able to search for shell commands that the user enters is problematic. stdin is not used, since it can contain shell history recall and editing commands that the shell can process, but for which Endpoint Privilege Management has no context. This mechanism works on the stdout data stream which should normally contain the resulting command with editing completed. This is easily defeated, however, by turning echo off.

This has several limitations:

  • This means that the output has newline characters when the screen width is reached, which does not accurately represent a shell command entry that wraps across the screen from one line to the next.
  • Typeahead is another problem. If the user begins typing the command before the shell prompt is output, the first few characters of the command entry are not contiguous with the rest of the command.
  • Termcap data for a given terminal is actually different across different platforms. For example, the vt100 left arrow is very different between Solaris and HP-UX. It may be necessary to replay I/O logs on the same operating system as they were generated from.
  • Large window sizes require more memory and processing time.
  • For I/O logs that have no TERM environment variable (cron jobs, for example), the xterm TERM is used.
  • Terminal commands that do not directly affect the screen data or the cursor position are ignored (for example: reverse video, dim, bright, blinking, underlined).

Given the limitations, this output is suitable for processing via grep, awk, perl, etc. If initial searches fail to find the offending pattern, try searches allowing for typeahead, and try searching for commands that turn echo off.

The --regex option enables built-in searching via the standard regcomp mechanism.

This uses POSIX Extended Regular Expression syntax. Substring addressing of matches is not supported. The match-any-character operators don't match a newline. The match-beginning-of-line operator (^) matches the empty string immediately after a newline, and the match-end-of-line operator ($) matches the empty string immediately before a newline.

ℹ️

Note

Since this feature works on output (not stdin), the beginning of line for command entry is typically a shell prompt.

The following options require both -O and --regex:

  • --ignore-case: Ignores case during the regex comparison.
  • -c : Allows the search to be limited to I/O logs whose policy variables meet the criteria specified in the constraint expression (for example, the search can be limited to I/O logs for a specific runhost, or specific submituser).
  • -p : Allows the output to be customized.
  • --files : Allows multiple files to be searched. The glob mechanism supports the question mark symbol (?) matching any single character, the asterix (*) matching any string, and character classes, ranges, and complementation within square brackets ([ and ]).
  • The -X option processes the terminal control codes in the same way as -O, then sends the data to Solr or Elasticsearch for indexing. Whether the data is sent to Elasticsearch or Solr depends on whether a correct Elasticsearch or Solr configuration is configured in /etc/pb.settings. If both Elasticsearch and Solr are configured correctly, then Elasticsearch takes precedence and data will only be sent there.
  • The -Z option processes the terminal control codes in the same way as -O and -X, and creates XML data, without sending that data to Solr. The JSON message can be displayed on the console. If -Z is set and /etc/pb.settings is correctly configured to send iologs to Elasticsearch, then the data is rendered on the console in JSON format. Otherwise, if /etc/pb.settings is configured correctly for Solr, then the data is rendered in XML format. As with -X, if both Elasticsearch and Solr are configured correctly, then Elasticsearch takes precedence and the data is presented on the console in JSON.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pbreplay [options] I/O_log_name
    --history
    --history2
    --history3
    --hideshellstartup 
    --nolinenumbers--markshellstartup 
    --showall
    -am, --map_printable
    -ao, --map_octal
    -av, --variables
    -ax, --map_hex
    -aX
    -e, --show_stderr
    -h, --header
    -i, --show_raw_stdin
    -I, --show_translated_stdin
    -k, --keyfile=key_file
    -m, --more
    -o, --show_stdout
    -A --audit
    -t, --timestamp[=format]
pbreplay -O [options] [I/O_log_name]
    -R, --regex <regular expression>
    --files <file glob pattern>
    -c <constraint expression>
-p <format expression>
pbreplay <--sendindex | -X> [options] [I/O_log_name]
pbreplay <--index | -Z> [options] [I/O_log_name]
pbreplay --forward
pbreplay –v | --version
pbreplay --help

Arguments

--historyDerives shell history from an ACA I/O log where session history was enabled via enablesessionhistory(true);
--history2Create more detailed ACA Session History Report.
--history3Create ACA Session History Report of all execs.
--hideshellstartupVersion 10.2.0 and earlier: --hideshellstartup not available.Version 10.3.0 and later: --hideshellstartup available.
Use alone, or in combination with the --history, --history2, and --history3 options.
Commands executed as part of the shell startup scripts (identified as processes with the same process group as the main shell) are omitted from the history report.
--markshellstartupVersion 10.3.0 and later: --markshellstartup available.
Use alone, or in combination with the --history, --history2, and --history3 options.
Commands executed as part of the shell startup scripts (identified as processes with the same process group as the main shell) are included in the history report with the text shellstartup preceeding the command and arguments.
[root@dev-01 tmp]# /tmp/pbreplay --history --markshellstartup iolog.CbCezgQDCBwV7Fl8tdVPAdi1
1 Info working directory set to: /tmp
2 Allowed shellstartup id -gn
3 Allowed shellstartup id -un
4 Allowed shellstartup uname -s
5 Allowed shellstartup ls /etc/bashcompletion.d
6 Allowed shellstartup | /bin/grep -q /home/bginn/.cabal/bin
7 Allowed shellstartup /usr/bin/tty -s
8 Allowed shellstartup /usr/bin/tput colors 2> /dev/null
9 Allowed shellstartup /usr/bin/dircolors --sh /etc/DIR_COLORS 2> /dev/null
10 Allowed shellstartup /bin/grep -qi ^COLOR._none /etc/DIR_COLORS > /dev/null 2> /dev/null
10 Allowed shellstartup /usr/bin/id -u
11 Allowed shellstartup /bin/hostname
12 Allowed shellstartup | sed -e s#..
$##
12 Allowed shellstartup /bin/hostname
13 Allowed shellstartup | head -1
13 Allowed shellstartup | tail -1
13 Allowed shellstartup | sed -e s#..*$##
13 Allowed shellstartup | head -1
13 Allowed shellstartup | tail -1
13 Allowed shellstartup /usr/bin/tty
14 Allowed shellstartup | sed -e s#/##g
15 Allowed id
17 Allowed date
[root@dev-01 tmp]#
--nolinenumbersDo not display line numbers on the ACA history report.
--showallDo not remove duplicate output from the ACA Audit report.
-am, --map_printableOptional. Maps unprintable characters in the selected streams (-e, - i, -I, -o) to printable sequences.
-ao, --map_octalOptional. Maps unprintable characters in the selected streams to octal format. (\xxx).
-av, --variablesOptional. Displays the variables for the secured task.
-ax, --map_hexOptional. Maps unprintable characters in the selected streams to hexadecimal format.
-aX [mV], --map_xwindowsOptional. Dumps relevant X11 captured events from the iolog. Major events such as creating and destroying windows, textual window updates, text input and mouse clicks are displayed as a summary alongside any output from the parent process.
m adds selected streams, V logs all X events.
-e, --show_stderrOptional. Non-interactive. Dumps the contents of the standard error stream. This option is useful for redirecting the data to a file or another program. For example, the output can be piped to grep to search for specific words or sequences.
-h, --headerOptional. Non-interactive. Prints a header that contains the secured task information. This option is useful only with dump options. The header is always printed in interactive mode.
-i, --show_raw_stdinOptional. Non-interactive. Dumps the contents of the standard input stream. This option is useful for redirecting the data to a file or another program. For example, the output can be piped to grep to search for specific words or sequences.
If the user typed carriage returns during the session, the input stream might contain carriage returns without linefeeds. On replay these cause the cursor to return to the left margin of the display and overwrite the previous line with the next line. If you are examining the data, lines may appear to be lost. To add line feeds to the display, use the option: -I (--show_translated_stdin).
-I, --show_translated_stdinOptional. Non-interactive. Dumps the contents of the standard input stream, adding linefeeds to carriage returns to improve readability. This option is useful for redirecting the data to a file or another program. For example, the output can be piped to grep to search for specific words or sequences.
-k, --keyfile=Optional. Uses the named key file to decrypt an encrypted I/O log file.
-m, --moreOptional. Interactively display the I/O log file using a pager-styles display (for example, less, more, pg) instead of using the native display.
-o, --show_stdoutOptional. Non-interactive. Dumps the raw contents of the standard output stream. The terminal interprets the raw terminal commands such as , , and . This option is useful for viewing the logged output.
-A, --auditDisplay ACA audit stream.
-t, --timestamp[=format]Displays timestamps on each line of output. The optional format argument can be any format string that is suitable for the date command. If the optional format string is omitted, then the system -t, --timestamp[=format] default time format is used.

[ver 5.0 and later]: option available.
-v, --versionRequired. Displays the program’s version and exits.
--helpOptional. Displays the program’s help message and exits.

The ACA Audit report lists file related libc/system calls and whether those calls were allowed or blocked via ACA.

Prior to EPM-UL 9.4, the output was similar to:

Fri Nov 11 12:02:41 2016:    7115    1    owner   9    execve /usr/bin/id
Fri Nov 11 12:02:41 2016:    7115    1    read    9    fopen  /etc/passwd
Fri Nov 11 12:02:41 2016:    7115    1    read    9    fopen  /etc/group

Starting with EPM-UL 9.4, the output is changed to:

Fri Nov 11 2016 12:02:41 PM [ 7115] Allowed exec /usr/bin/id
Fri Nov 11 2016 12:02:41 PM [ 7115] Allowed read /etc/passwd
Fri Nov 11 2016 12:02:41 PM [ 7115] Allowed read /etc/group

And with additional loglevels:

Fri Nov 11 2016 12:08:36 PM [ 7359] Allowed read /etc/group TAG:DEFAULT dev:64768 ino:2107740 mode:100644 uid:0 gid:0
Fri Nov 11 2016 12:08:37 PM [ 7368] Allowed exec /usr/bin/head ARGV:[head /etc/passwd] TAG:DEFAULT
    ENV: LOGNAME=jsmith
    ENV: PWD=/home/jsmith
ENV: HISTSIZE=1000

The ACA history report derives shell history from the ACA I/O log, and produces a report similar to a shell’s history command:

# pbreplay --history   aca.iolog.log.aZTkfJ
    1 Info     working directory set to: /home/jsmith
    2 Allowed  date
    3 Allowed  id
4 Allowed  head /etc/passwd

-O Optional. Non-interactive. Produces searchable output by interpreting tty commands such as , , and . This option is useful for redirecting the data to a file or piping to another program. For example, the output can be piped to grep to search for specific words or sequences. This option also allows direct searching via the --regex option.

-O arguments

--R, --regex Optional regular expression to search for using built-in search mechanism.
The default output includes runhost, user, date/time, and matching line of text.
--ignore-caseOptional flag to ignore case during regex search.
-c Optional constraint expression using the policy language. Similar to constraints used by pblog. Requires the -O and --regex options.
-p Optional output format expression using the policy language. Similar to format expressions used by pblog.
Requires the -O and --regex options.
--files ""Optional file glob pattern used to search more than one file at a time.
Quotes are required, so that the shell does not interpret the glob pattern prior to passing it to pbreplay.
Requires the -O and --regex options. The default output includes filename, runhost, user, date/time, and matching line of text.

-X arguments

-T, --indextimeInclude newline timestamp in indexed data.
-QRetrieve filenames from indexing queue.

-Z arguments

-T, --indextimeInclude newline timestamp in indexed data.
--forwardIndex IOLogs identified in the IOLog index store and forward file.

The following table shows the keyboard keys that can be used with pbreplay in interactive mode to emulate the Unix/Linux pager:

Keyboard keys used with pbreplay in interactive mode

KeyDescription
gGo to the beginning of the I/O log.
GGo to end.
SpaceDisplay the next screen of the I/O log.
or Advance the display one line.
sSkip to the next time marker.
uUndo.
tDisplay the time stamp from the current line in the I/O log file.
rRedraw from the start.
q or QQuit.
vDisplay the variables for the I/O log file.
Backspace or DeleteBack up to the last position.
cContinuous slow speed replay.
- or -Use + to increase the replay speed. Use a hyphen (-) to decrease the replay speed.
Version 5.1.1 and earlier: option not available.
Version 5.1.2 and later: option available.
fFind.
kFind time stamp. The format is [MM/DD/[CC]YY HH:M [:SS].
.h or ?Display a navigation help message.

Files

I/O log file

Example

pbreplay /usr/adm/pb.jqpublic.ksh.a05998

Entering the command above produces output similar to the following:

Start of log =========================================
    2005/09/08 15:16:07 [email protected] -> [email protected] ksh
    Commands:
    g - go to start,
    G - go to end,
    Space - go to next input
    <CR> or <NL> - go to next newline,
    s - skip to next time marker
    u - undo,
    t - display time, r - redraw from start, q/Q – quit
    v - dump variables, <BS> or <DEL> - backup to last position
    c – continuous slow speed replay, f - find, k – find time stamp
h or ? - display this help message

You can navigate the I/O log file by pressing the space key (next input character), the carriage return or newline key (newline), or the s character, which shows you what happened each second. Alternatively, you can back up through the log file by pressing the Backspace or Delete key. You can quickly go to the start or end of the log file using g or G, respectively. Display the time of an action at any point in the log file using t, redraw the log file using r, and undo your last action using u. You can also display all of the environment variables that were in use at the time the log file was created using v. Use q or Q to quit pbreplay.

Example

pbreplay -O /var/log/pbul/iolog.aaaaaa
pbreplay -O --regex 'passwd' /var/log/pbul/iolog.aaaaaa
pbreplay -O --regex 'passwd' --files '/var/log/PBLOGS*/iolog.*'
pbreplay -O --regex "passwd" --files "/var/log/pbul.iolog.*" \
    -c "runhost=='hostabc.beyondtrust.com'" -c "date=='2012/04/10'"
pbreplay -O --regex 'passwd' --files '/var/log/PBLOGS*/iolog.*' \
-p "sprintf('%s %s %s %s\n', basename(iolog), user, runhost, regexmatch)"

📘

For more information, see man regcomp, man glob(7), pbcheck, pbkey, pblocald, pbmasterd, pbpasswd, pbrun, pbsum.

pbreport

  • Version 3.5 and earlier: pbreport not available.
  • Version 4.0 and later: pbreport available.

pbreport extracts data from the event logs and optionally generates one or more reports based on the extracted data as specified in the named report file. The report file is an XML file that contains the extraction and reporting specifications, and is typically configured using the event log reporting feature of pbguid, the Endpoint Privilege Management for Unix and Linux Web GUI.

Syntax

pbreport [options] report-file
   -i, --info
   -k, --keyfile=file_name
   -s, --suppress
   -t, --temp
   -V, --verbos
pbreport –v | --version
pbreport –h | --help

Arguments

-i, --infoOptional. Displays detailed information about the named report-file.
-k, --keyfile=file_nameOptional. Name of the encryption key file.
-s, --suppressOptional. Suppress report output to the screen and user-defined commands, if any, that are specified in the named report-file. Useful for testing report runs by overriding any user-defined commands that are specified in the report specifications.
-t, --tempOptional. Does not remove the temporary files that are created during the reporting process. If reporting problems occur, then you can send these files to BeyondTrust Technical Support for analysis.
-V, --verboseOptional. Displays more verbose output.
-v, --versionOptional. Displays the program version and exits.
-h, --helpOptional. Displays the program help and usage information.

Files

Report set file

Example

pbreport /temp/report.set

📘

For more information, see pblog.

pbrun

pbrun requests that a secure task be run in a controlled environment. The user prefixes the command line with pbrun.

Example

pbrun backup /usr/dev/dat

pbrun checks the settings file for a submitmasters entry or the netgroup @pbsubmitmastersto determine the policy server daemon to which it should send the request. If the policy server daemon accepts the request, then it directs a local daemon to start the task request on the run host.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pbrun [options] command [command_arguments]
   -b, --background
   -d, --debug=connect
   -d, --debug=log=<level>
   -d, --debug=mlog=<level>
   -d, --debug=glog=<level>
   -d, --debug=llog=<level>
   -d, --debug=time
   -d, --debug=ttime
   --disable_optimized_mode
   -h, --host=run_host
   -l, --local_mode
   -n, --null_input
   -p, --pipe_mode
   --solarisproject projectname
   -u, --user=request_user
   --testmaster=master_host
   -X
pbrun –v | --version
pbrun --help

Arguments

-b, --backgroundOptional. The target job is directed to ignore hang up signals. This option is particularly useful for running the target program in the background.
-d connect, --debug=connectOptional. Displays policy server connection information for debugging.
-d log=level, --debug=log=level Optional. Generate debug trace logs for pbrun and all active EPM-UL components that process the command. Specify a level number from 1 (least detail) to 9 (most detail). The resulting logs reside in the same location as the corresponding diagnostics log.
Version 8.0 and later: setting available.
-d glog=level, --debug=glog=level Optional and only available when running as root. Generate debug trace log for pblogd that processes the command. This setting is made permanent for that log host.
Specify a level number from 1 (least detail) to 9 (most detail). The resulting logs reside in the same location as the pblogd diagnostic log file.
Version 8.0 and later: setting available.
-d mlog=level, --debug=mlog=levelOptional and only available when running as root. Generate debug trace log for pbmasterd that processes the command. This setting is made permanent for that policy server host. Specify a level number from 1 (least detail) to 9 (most detail). The resulting logs reside in the same location as the pbmasterd diagnostic log file.
Version 8.0 and later: setting available.
-d time, --debug=timeOptional. Displays pbrun timing information for debugging. This option is intended primarily for BeyondTrust Technical Support.
-d ttime, --debug=ttimeOptional. Display pbrun total run time for debugging.
--disable_optimized_runmodeDisable pbrun optimization and use pblocald even when submit host and run host are the same. This affects only the local submit host.
Version 5.0 and later: option available.
--disable_optimized_runmode switch is not available in SaaS (EPM-L)
-h, --host=run_hostOptional. Requests run_host as the run host for the secured task. Ignored if -l is also specified, or if the runlocalmode policy variable is set to true.
-h option is not available in SaaS (EPM-L)
-l, --local_modeOptional. Requests that the secured task run locally. Once the policy server host’s policy accepts the request and logs its start, the target program replaces the pbrun on the local machine.
This option provides increased efficiency and reduced network traffic, but job termination status and timeout processing. This mode can be disabled in the configuration file by setting allowlocalmode to false. This mode can also be overridden in the policy by setting runlocalmode to 0.
-n, --null_inputOptional. Redirects the standard input of pbrun to /dev/null. You sometimes need this option to avoid interactions between pbrun and the shell that invokes it. For example, if you are running pbrun and start pbrun in the background without redirecting its input away from the terminal, it blocks even if no reads are posted by the remote command. These options prevent this situation.
-p, --pipe_modeOptional. Puts pbrun into pipe mode. Forces the secured task to behave as if it is run in a pipeline rather than a terminal session.
--solarisproject projectnameOptional. Associates the Solaris project projectname with the secured task. Requires Solaris version 9 or later on the runhost.
Version 6.1 and later: option available.
--testmaster=master_host Optional and only available when running as root. Requests master_host as the policy server host to test whether a command will be accepted or rejected. The command itself is not executed. Specify either the hostname or the IP address for the master_host.
Version 8.0 and later: option available.
-u, --user=request_userOptional. Sets the variable requestuser to request_user. The policy can then decide to honor the request and set runuser and/or runeffectiveuser equal to request_user.
.-v, --versionOptional. Displays the program version and exits.
--helpOptional. Displays the program help message and exits.
-XOptional. Activates X11 forwarding.
When running pbrun with the -X option, the DISPLAY environment variable needs to be set, and a valid XAuthority token needs to exist in the users .Xauthority file.
This can be checked using:
xauth list $DISPLAY

Files

/etc/pb.settings (Local EPM-UL submithost settings.)

Example

pbrun –h runhost uname -a

📘

For more information, see pbcheck, pblocald, pblog, pbmasterd, pbpasswd, pbreplay, pbsum, pb.settings file, Debug Trace Logging, xwinforward, xwinreconnect

pbssh

  • Version 6.0.1 and earlier: pbssh program not available.
  • Version 6.1 and later: pbssh program available.

Using EPM-UL policy and the pbssh program, you can control access to, and activities on, SSH-managed devices. The pbssh program is similar to the pbrun program, except that it uses the SSH protocol (or, optionally, the telnet protocol) to connect to devices that do not have EPM-UL installed on them; such devices can include Windows computers and certain network devices.

You must specify the -h option (to indicate the host name of the target device), and the -u option (to indicate the user name with which to log into the device). To execute a command on the target device, use the -C option. You may also optionally use the -P (--port) option to specify a particular port for the SSH connection.

If you have a Password Safe appliance, the EPM-UL can be configured to automatically obtain the device password from Password Safe. To do so, the following EPM-UL settings must be specified on the submit host:

  • pkrunfile
  • pk_cert (or the --pk_cert option)
  • pk_servers (or the --pk_servers option)
  • pbsshshell (optional)

If you do not have a Password Safe appliance, then pbssh prompts the user for the password. The user is also prompted under these circumstances:

  • The Password Safe appliance is not available.
  • The Endpoint Privilege Management for Unix and Linux settings are not specified or not correctly specified.
  • The --skip_pkrun option is specified on the pbrun command line.
  • The --telnet option is specified on the pbrun command line.

The --domain option has two purposes, both of which are related to Password Safe:

  • If you need to log into a host using a domain account, then you use the --domain option defines the domain from which Password Safe should obtain the domain account password.
  • If the --user option defines a user account, and you want to use a Password Safe managed account alias in place of the actual managed system name, then you use the --domain option to specify the managed system alias.

ℹ️

Note

Unlike pbrun, pbssh does not require a command to be specified. Consequently, the Endpoint Privilege Management for Unix and Linux policy function basename() always returns pbssh. In the Endpoint Privilege Management for Unix and Linux policy, to determine the command that was specified, parse the argv list.

Syntax

pbssh [options] command [command_arguments]
   -c, --pk_cert
   -C, --command
   -d, --debug=connect
   -d, --debug=time
   -d, --debug=ttime
   -D, --domain
   -h, --host=run_host
   -k, --skip_pk
   -K, --pk_servers
   -P, --port=ssh_port
   -r, --pk_reset_password
   -T, --telnet
   -u, --user=request_user
pbssh –v | --version
pbssh --help

Arguments

-c, --pk_certOptional. Absolute path to the Password Safe certificate on the submit host.
Overrides the pk_cert EPM-UL setting.
-C, --command='ssh_command'Optional. Command and arguments to be executed on the target SSH-managed device. If arguments are specified, the command and its arguments must be enclosed together in single quotation marks.
-d connect, --debug=connectOptional. Displays policy server connection information for debugging.
-d time, --debug=timeOptional. Displays pbssh timing information for debugging. This option is intended primarily for BeyondTrust Technical Support.
-d ttime, --debug=ttimeOptional. Displays pbssh total run time for debugging.
-D, --domainOptional. Specifies a domain for Password Safe to use when obtaining a domain account password, or defines a Password Safe managed system alias to use instead of the actual host name.
Version 6.2 and later: option available.
-h, --host=run_hostRequests run_host as the run host for the secured task.
-k, --skip_pkrunOptional. Specifies that the SSH-managed device password not be obtained from Password Safe.
-K, --pk_serversOptional. Specifies the host name or IP address of one or more Password Safe appliances. Overrides the pk_servers EPM-UL setting.
To specify more than one appliance, separate each name by a space and enclose the list in quotation marks.
-P, --port=ssh_portSpecifies a TCP port to use for the SSH session. If not specified, then a default port number is used.
-r, --pk_reset_passwordOptional. Specifies that Password Safe check in a new password for the user after the Password Safe command is complete.
-T, --telnetOptional. Specifies that a connection to an SSH-managed device be made using the telnet protocol, not the SSH protocol.
-u, --user=request_userSets the variable requestuser to request_user. The policy can then decide to honor the request and set runuser and/or runeffectiveuser equal to request_user.
-v, --versionOptional. Displays the program version and exits.
--helpOptional. Displays the program help message and exits.

Files

/etc/pb.settings Local EPM-UL submithost settings

Example

pbssh –h runhost -u jjones -C "dir /w"

📘

For more information, see Connections to SSH-Managed Devices.

pbsum

pbsum prints the checksum of one or more files. The checksum can be used in a policy configuration file to check the requested program’s integrity. If anyone has modified the program and thereby changes the checksum, the secured task is refused. The string that is produced by pbsum can be used to set the value of the runmd5sum variable in the Endpoint Privilege Management for Unix and Linux policy configuration file.

Syntax

  • Version 3.5 and earlier: long command options not supported.
  • Version 4.0 and later: long command options supported.
pbsum file_names
pbsum -m | --md5 file_names
pbsum –v | --version
pbsum --help

Arguments

-m, --md5 file_namesOptional. Use the MD5 algorithm to generate a checksum.
-v, --versionOptional. Displays the pbsum version and exits.
--helpOptional. Displays the program help message and exits.

Files

None

Example

pbsum /etc/pb.settings file
pbsum -m /etc/pb.settings /bin/ls

📘

For more information, see pbcheck, pbkey, pblocald, pbmasterd, pbpasswd, pbreplay, pbrun.

pbsync

  • Version 4.0 and earlier: pbsync not available.
  • Version 5.0 and later: pbsync available.

The pbsync command starts the log synchronization process. The command takes as an input one or more log servers, port numbers, and log file names, and uses that information to synchronize the network logs. This component is referred to as the client.

On the first execution of this feature, the complete event logs are transferred from the failover log servers to the primary log server; event log files are merged there into one log file to make auditing easier.

pbsync can request the following:

  • That event logs from different log servers be merged
  • That partial I/O logs from different log servers be merged into one I/O log
  • That merged logs be sent to the client

⚠️

Important

To successfully merge encrypted I/O logs, all log servers must use the same encryption algorithm and key. For more information, see iologencryption.

In EPM-UL version 6.0 and later, the log synchronization server (pbsyncd) uses the eventlog setting in its own pb.settings file to determine the location of the event log file when it receives a pbsync -l request. This change can cause errors when merging pre-version 6.0 event logs if the eventlog setting on the log synchronization server does not match the eventlog setting on the requesting client host. To ensure that pre-version 6.0 event logs are found by the log synchronization server, use pbsync with the -L option.

Syntax

pbsync [options]
pbsync -v|--version
pbsync --help

Arguments

-l, --eventUses the log synchronization server’s pb.settings file to automatically obtain the event log server, port, and event log file to use. Specify the event log file name in the eventlog keyword, specify the event log server in the logservers keyword, and use the syncport keyword to specify the port.
-L, --eventlog server_info[:path/file_ name[:port]]Manually adds a server to gather the event logs from. path and file_name are optional the path and file name of the event log file to retrieve. The server_info may be a hostname or an IP address. When specifying an IPv6 address, it must be enclosed in square brackets.
If port is not specified, then the default port from the settings file (syncport setting) is used.
You must repeat the -L switch for each server from which you want to retrieve event log files.
-i, --iosearch basepath Queries the I/O log servers that are listed in the logservers setting in the server’s pb.settings file to obtain any partial I/O log files that have basepath in their file names. basepath is the path and file name of the original I/O log file. All matching partial I/O log files are merged to create a single output I/O log file.
Version 6.0 and later: option available.
-I, --iolog server_info:path/file_ name[:port]Manually adds a server to gather an I/O log file from. path and file_name are the required path and file name of the I/O log file to retrieve. The server_info may be a hostname or an IP address. When specifying an IPv6 address, it must be enclosed in square brackets. If port is not specified, then the default port from the settings file (syncport setting) is used.
If this option is used to merge the I/O logs (without -r), only the I/O logs of the same session (partial I/O logs) are merged together in the generated output file. Any I/O log that does not belong to the same session as the first I/O log gathered are ignored. You must repeat the -I switch for each server from which you want to retrieve I/O log files.
Version 6.0 and later: option available.
-o, --outputfile file_name User-defined path for the local output file. Cannot be used with -O or -P.
Path must be to a secure directory (that is, readable and writable by root only).
-O, --outputdir directory_nameUses alternate path to write the collected files. Cannot be used with -o or -P.
Path must be to a secure directory (that is, readable and write able by root only).
-d, --daemonStarts the synchronization process in daemon mode. In daemon mode, pbsync attempts to resynchronize the specified logs at a frequency that is specified by the logresynctimermin setting in the client’s pb.settings file.
-r, --retrieveOnly retrieves log files; does not merge them. Cannot be used with -P.
-v, --versionDisplays the version.
--helpDisplays the help message and exits.

Command line responses

Command Line ResponseDescription
Synchronization daemon unable to startThe synchronization daemon was unable to start.
Synchronization daemon: Unknown request (0xcode)The request from pbsync was unknown or not supported.
Unable to connect to log server The system is unable to establish communications with the server, and is therefore unable to retrieve the log records.
Unable to retrieve file on server The remote server reports that it is unable to read or transmit the file; check the file permissions or path.
Unique ID mismatch on
::
(local ID:
)
The unique ID in the remote log files mismatch with the local server.
Timed out while retrieving ::The operation timed out while retrieving a remote log file, causing the merge to fail.
Insufficient storage space to complete synchronizationThere is insufficient storage to either retrieve or merge the file; user must free up some space.
SuccessThe synchronization operation was successful.

Files

None

Example

Executing the following causes pbsync to look for the file pattern /var/adm/pb.user1, collect the logs, and synchronize them:

pbsync -i /var/adm/pb.user1

Example

Executing the following synchronizes the log files on machines dart and aji:

pbsync -L dart:/var/log/pb.eventlog:6298 -L aji:/var/adm/pb.eventlog:6298

📘

For more information, see pbsyncd.

pbsyncd

  • Version 4.0 and earlier: pbsyncd not available.
  • Version 5.0 and later: pbsyncd available.

The pbsyncd server listens for log synchronization requests from one or multiple pbsync clients.

pbsyncd is started as a stand-alone service or daemon from the command line or startup scripts, preferably running on each system that is also running pblogd (for log synchronization) or pbmasterd (for policy updates). A new TCP port is required to accept requests. The default port is 24350. This component is referred to as the server.

Log synchronization: When the server receives a synchronization request, it checks its own pb.settings file to determine the event log file name (as specified in the eventlog keyword) to retrieve. If the eventlog keyword is not specified, then the server uses the event log file name that is specified in the request.

Changes that are made to the pb.settings file after the daemon is started do not affect the operation of the daemon. If you change the pb.settings file, then you must restart the daemon for the changes to take effect. If you do not restart the daemon, then the daemon continues to operate using a snapshot of the pb.settings file that was cached at the time the daemon was started.

If pbsyncd detects an error, then an error message is logged in the server’s diagnostic log file. For log synchronization, the client can request the following:

  • That event logs from different log servers be merged
  • That partial I/O logs from different log servers be merged into one I/O log
  • That merged logs be sent to the client

Syntax

pbsyncd [options]
pbsyncd -v|--version
pbsyncd --help

Arguments

-d, --daemonRuns pbsyncd in daemon mode.
To use the -d option, you must also use the -p option.
-f, --foregroundRuns the server in the foreground when using daemon mode.
-p, --port port_numberInstructs the server to listen to the defined port number (use a TCP port other than the default).
-e, --errorlog errorfileUses the named file as the error log.
-s, --syslog <facility>Uses the syslog facilities.
-v, --versionDisplays the version.
--helpDisplays the help message and exits.

Command line responses

Command line responseDescription
Synchronization daemon unable to startThe synchronization daemon was unable to start.
Synchronization daemon: Unknown request (0xcode)The request from pbsync was unknown or not supported.
Unable to connect to log server <name>The system is unable to establish communications with the server, and is therefore unable to retrieve the log file.
Unable to retrieve file on server The remote server reports that it is unable to read or transmit the file; check file permissions or path.
Unique ID mismatch on ::<uniqueID> (local ID:<uniqueID>)The unique ID in the remote log files mismatch with the local server.
Timed out while retrieving <server name>::<port>The operation timed out while retrieving a remote log file, causing the merge to fail.
Insufficient storage space to complete synchronizationThere is insufficient storage to either retrieve or merge the file; user must free up some space.
SuccessThe synchronization operation was successful.

Files

None

Example

Entering the following starts the daemon and specifies /var/log/syncserver.log as the output error file:

pbsyncd -d -p 24345 -e /var/log/syncserver.log

📘

For more information, see pblog, pbsync.

pbumacs

pbumacs is an editor similar to umacs. umacs is a small version of emacs with gosling-style emacs key bindings.

pbumacs has been modified so that it can be used securely with the Endpoint Privilege Management for Unix and Linux programs.

Security has been enhanced with the following features:

  • pbumacs must be started with a full path name specified.
  • The user cannot access any files other than the one that is specified at startup time.
  • The user is not allowed to spawn any processes.

This program, when used with Endpoint Privilege Management for Unix and Linux, can allow users to access a specific file as root, but not other root functions or files.

Syntax

pbumacs fullpathname

Arguments

fullpathnameFile to edit.

Files

None

Example

Executing this command displays the contents of the file called fullpathname for editing:

pbumacs fullpathname

📘

For more information, see pbrun.

pbuvqrpg

  • Version 3.5 and earlier: pbuvqrpg not available.
  • Version 4.0 and later: pbuvqrpg available.

pbuvqrpg is a licensed utility from UV Software’s Vancouver Utilities set. It is used internally to generate text-based reports from a description file that is created by the Endpoint Privilege Management for Unix and Linux pbreport program.

Syntax

pbuvqrpg

Arguments

Not published

📘

For more information, see pblog, pbreport.

pbversion

  • Version 5.1.2 and earlier: pbversion not available.
  • Version 5.2 and later: pbversion available.

pbversion reports the binary file version numbers and optionally reports installed components of Endpoint Privilege Management for Unix and Linux. This non-interactive utility can be run on any machine and provides a list of the version numbers for all known Endpoint Privilege Management for Unix and Linux binary files. Installations are identified using the prefix and suffix arguments or the default installation if a prefix and/or suffix is not specified.

Only root can run pbversion. Prior to v8.0 pbversion can only be run from the installation directory and it should not be moved from the installation directory because it is dependent on Endpoint Privilege Management for Unix and Linux installer scripts.

With v8.0 and later, pbversion is available as part of the installed binaries after the install (located in the admin directory which is /usr/sbin by default).

pbversion does not report on Endpoint Privilege Management for Unix and Linux versions prior to v4.0 because the binary version arguments were not available previously. Also, it does not report on binary version for executable files pbnvi or pbuvqrpg because the version argument does not display the binary version.

Syntax

pbversion [options]
   -p prefix
   -s suffix
   -c
pbversion -v
pbversion -h

Arguments

-cDisplays the installed components.
-hPrints usage message and exits.
-p prefixSets the installation prefix.
-s suffixSets the installation suffix.
-vPrints the version of pbversion and exits.

Example

Display the binary versions for the installation using the prefix my along with the Endpoint Privilege Management for Unix and Linux installation components by executing the following:

./pbversion -p my -c

📘

For more information, see pbinstall, pbuninstall.

pbvi

  • Version 4.0.0 and later: pbvi setting available.

Description

The pbvi editor is similar to the standard vi editor. It has been modified so that it can be used securely with the Endpoint Privilege Management for Unix and Linux programs. Security is enhanced with the following features:

  • pbvi must be started with a full path name specified.
  • The user cannot access any files other than the one that is specified at startup time.
  • The user is not allowed to spawn any processes.

This program, when used with EPM-UL, allows users to access a specific file as root, but not access other root functions or files.

The edited file is written back to the same path. If this path changed by an external process, then the file is written to the new location to which the path refers. Whenever pbvi is run from Endpoint Privilege Management for Unix and Linux, the arguments should be checked to ensure that the user cannot change the path and no security hole is introduced.

Syntax

pbvi fullpathname

Arguments

fullpathnameFile to edit.

Files

None

Example

To display the contents of the file called fullpathname for editing, enter the following:

pbvi fullpathname

📘

For more information, see pbrun .


©2003-2025 BeyondTrust Corporation. All Rights Reserved. Other trademarks identified on this page are owned by their respective owners. BeyondTrust is not a chartered bank or trust company, or depository institution. It is not authorized to accept deposits or trust accounts and is not licensed or regulated by any state or federal banking authority.