What is pbrun command

http://linux-n-unix.blogspot.hk/2010/07/what-is-pbrun-command.html

pbrun

Usage: pbrun [-v][-n][-p][-d option] [-h hostname]
          [-u usernamecommand [args ...]


The pbrun command is used to request that an application or command be run in a controlled account. The user simply adds pbrun to the beginning of the command line, for example:

  • pbrun backup /usr /dev/dat

pbrun then checks the /etc/pb.settings file to determine the master daemon to which it should send the request. Once it has contacted a master daemon, it sends a request to the daemon to run the application specified. As with the rlogincommand, you can type ~^Z to suspend pbrun, or ~. to terminate it. Both must be typed at the beginning of a new line.pbrun has several options:
-d option
This outputs debugging information.
When option is connect this displays debugging information regarding connections between clients and masters. TCP/IP socket information and machine name lookup statistics can be useful for solving DNS and NIS problems. For example:

  • pbrun -d connect ls

when option is time or ttime displays debugging information regarding the timing or total time of each subsection of the pbrun command. It is useful for isolating performance bottlenecks between networked machines and solving obscure timing problems.

  • pbrun -d time ls

-h hostname
allows the user to request a particular execution host that will run the request. If present, the 
-h hostname must come before the command being requested.
-n
redirects the input of 
pbrun to /dev/null. You sometimes need this option to avoid unfortunate interactions betweenpbrun and the shell that invokes it. For example, if you are running pbrun and start a pbrun in the background without redirecting its input away from the terminal, it will block even if no reads are posted by the remote command. -n prevents this.
-p
puts 
pbrun into "pipe mode," in which all interactions with the user's terminal are done without changing any of the terminal parameters. Normally, pbrun puts the terminal into raw mode, so that programs such as text editors, which require raw mode, can run properly under pbrun. Pipe mode is useful when several pbrun commands must be piped together, for example:

  • pbrun -p ls /etc/secure | pbrun -p dbadd listing

-u
username 
sets the requesting user to be username.
-v
displays the current version number of 
pbrun.

Reference: 
Chapter 20: Reference - Programs

http://www.uiweb.uidaho.edu/pb/pb27-20.htm

Chapter 15: Executing Programs within PowerBroker
http://www.uiweb.uidaho.edu/pb/pb27-15.htm

 

 

======http://www.cnblogs.com/kapok/archive/2006/03/03/341888.html

PowerBroker常见问题

Document Actions
  • Send this page to somebody
  • Print this page

一般性问题:

1)      PowerBroker怎样工作?

答:PowerBroker使用C/S体系结构,由三个主要程序组成。

Pbrun:通过pbrun,客户提交请求去运行特定的程序。

Pbmasterd:检查每个请求,依据配置策略文件信息,或者接受,或者拒绝。

Pblocald:如果请求被接受,locald进程作为userID(例如 root)运行应用程序。

2)      如果root密码已知,PowerBroker能够限制哪个用户能够转换到root吗?

答:不能。PowerBroker可以允许root级别访问(或者其他ID)而不透漏root密码。

3)      安全策略文件是什么?

答:安全策略文件是基于规则的约束文件,准许基于时间、主机、userID等访问。在这样的约束环境里,用户被指定扩展访问权限。策略文件支持广泛的程序应用,字符串/语法分析,和其他的功能。

4)      PowerBroker需要多少系统空间开销?

答:一个PowerBroker会话(Pbrun)就像一个telnet会话,只需要系统I/O维护;安全策略文件是ASCII文件,只占用系统很少的磁盘空间;但是日志文件增长的很快,他们分两种:1)pb.eventlog。命令的接受拒绝结果倍添加到文件中。估计每一个pbrun审计记录都会添加大概100行的文本内容。2)Keystoke log。文件大小依赖于有多少pbrun会话被Keystroke记录,用户会话将持续多长时间,和他们执行的命令。Keystroke记录默认的输入、输出和标准错误。设置cron或定时工作软件每天处理这些文件应该是一个好主意。 

5)      安装过程很棘手吗?

答:安装过程简单、快速,不需要修改系统内核,也不需要重新启动。程序设置和文件定位都是从安装菜单进行选择。 

6)      对于指定系统PowerBroker能够使用自动安装方法吗?

答:可以。在预定义的回答后,一个批量工作可以被运行在多台主机。使用NFS-mounting的分区将使任务变得十分简单。  

7)      PowerBroker可以实现集中管理吗?

答:可以。PowerBroker能够集中管理日志文件和安全策略文件。日志文件能被定向到一台指定的日志服务器。为实现最大化安全保证,日志主机和master主机应该分离开。 

8)      PowerBroker软件如何得到许可?

答:软件许可依赖于连接到master主机的客户数量。 

9)   PowerBroker提供加密/解密、数字签名或证书吗?

答:是。网络流量通过私用算法加密防止网络窃听。Master和client之间的通讯使用DES或3DES进行加密。 

10)   PowerBroker支持ssh用户授权吗?

答:不。 

11)   PowerBroker管理功能支持CLI和GUI吗?

答:可以。安全策略文件和设置文件可以使用GUI界面进行管理。 

12)   PowerBroker能够提供脚本去允许在批量模式进行指导执行吗?

答:是。 

13)   PowerBroker提供在线帮助吗?

答:是。 

14)   PowerBroker提供用户对文件和目录的读写、执行、改变权限等操作进行访问控制吗?

答:是。但是并不提供一个完全的访问控制系统。 

15)   PowerBroker能阻止未注册的setuid/setgid程序执行吗?

答:是。但是未注册的程序可以被直接执行。 

16)   PowerBroker能控制哪个用户可以执行setuid/setgid程序吗?访问许可能被授权给其他的用户和组吗?

答:是。 

17)   PowerBroker能够依赖被使用的程序允许或拒绝用户访问到一个文件和目录吗?

答:是。命令行解析被完成在接受和执行之前。

18)   PowerBroker能够阻止tampered-with setuid/setgid程序被执行么?

答:是。在执行之前的校验值检验可以被自动执行。 

19)   PowerBroker能够限制用户登陆的系统或设备吗?

答:是。 

20)   PowerBroker能够作时间限制吗?

答:是。 

21)   PowerBroker能限制包括root的用户转换到一个特殊userID吗?甚至于userID的密码已经被知道。

答:不能。PowerBroker不能阻止密码已知的登陆。 

22)   PowerBroker允许审计记录被集中管理吗?

答:允许。集中管理日志服务器能够被设置。日志文件也能够被合并。 

23)   PowerBroker能够保证审计记录的完整性吗?包括root,禁止他们访问文件。

答:用户可以禁止,但是root不可以。 

24)   PowerBroker支持系统名称吗?

答:可以。系统名称查询通过/etc/hosts、NIS或者DNS。 

25)   PowerBroker支持组功能吗?如何实现?

答:可以。支持Unix网络组,而且变量名和列表可以被管理员创建。 

26)   PowerBroker支持网络地址吗?

答:可以,使用IP地址。 

27)   PowerBroker支持特殊名称模式的组合吗?如何实现?

答:可以。字符串处理功能被包含在策略语言中,用来解析主机名从“submithost”或“pbhost”中。

技术问题:

 

1)      如果PowerBroker Master Daemon死掉了,会发生什么事?

答:Symark建议设置至少一个failover master。Master和failover master保持一样设置和安全策略文件。

2)      从版本2.6到2.8的更新,建议步骤是什么?

答:为了简化审计,保持版本2.6 master的运行,直到所有的客户机都更新到2.8以后。

如果另外一台Server可用,设置一台powerbroker 2.8服务器帮助更新过程。拷贝/etc/pb.Conf和策略到新的服务器并校验一致性。这里不应该存在任何兼容性问题。然后更新客户机,设置指向到新服务器(在/etc/pb.settings文件中)。拷贝旧master上的pb.key到新服务器,保持和客户机的一致性。最后,在校验所有客户机和新服务器工作正常的情况下,更新旧服务器。修改客户机“master”地址在/etc/pb.settings文件中,指向最终服务器地址。

一旦你已经有了2.8版本的客户机,你可能希望运行./pb/install 目录中的pbmakerremotertar脚本,然后你可以把tar文件放到nfs服务器上,简化实施。然后你可以安装新客户机通过cron程序,如果安装被设计通过mounting安装目录,untar文件和运行pbremoteinstall脚本。这个脚本将更新/etc/inetd.conf和/etc/services文件,为了完成安装重起inetd。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值