[z/OS]

资源访问控制设施

以下工具和技巧可帮助您管理用于 WebSphere® Application Server for z/OS® 的安全性定义:
  • 用于列示类中所有概要文件的 RACF® ISPF 面板
  • 用于按 UID 或用户标识顺序列示 UID 的 ISHELL
  • 用于按 GID 或组标识顺序列示 GID 的 EXEC
  • 用于退出 RACF 定义的 EXEC

RACF ISPF 面板

要列出特定类中的所有概要文件,请使用 RACF ISPF 面板。必须具有 RACF SPECIAL 或 AUDITOR 权限才能完成以下步骤:
  • 选择“一般资源概要文件”(选项 2)。
  • 搜索(选项 S 或 9)。
  • 输入类名。
  • 再按两次 Enter 键。
------------------------------------------------
RACF - 服务选项菜单
选项 ===> 2
选择下列其中一项:
1 数据集概要文件
2 一般资源概要文件
3 组概要文件和用户至组的连接
4 用户概要文件和您自己的密码
5 系统选项
6 远程共享设施
7 数字证书和密钥环
99 退出
------------------------------------------------

-----------------------------------------------------
RACF - 一般资源概要文件服务
选择下列其中一项:
1 ADD:添加概要文件
2 CHANGE:更改概要文件
3 DELETE:删除概要文件
4 ACCESS:保留访问列表
5 AUDIT:监视访问尝试次数(仅适用于审计员)
D 或 8 DISPLAY:显示概要文件内容
S 或 9 SEARCH:搜索概要文件的 RACF 数据库
-----------------------------------------------------

------------------------------------------
RACF - 一般资源服务 - 搜索
选项 ===>
输入以下概要文件信息:
类 ===> 已启动
概要文件 ===>
------------------------------------------

-----------------------------------
浏览 - RACF 命令输出 ----
命令 ===>
T5ACR.* (G)
T5DMN.* (G)
T5SRVNDS.* (G)
T5SRV1S.* (G)
T5SRV2S.* (G)
T5SRV3S.* (G)
WMQX*.* (G)
WSCWTRC.*
-----------------------------------

也可使用 RACF SEARCH 命令 SEARCH CLASS(class_name) 来获取类中所有概要文件的列表。

按 UID 顺序列示所有用户

使用 RACF 中的 OMVS 分段定义新的用户标识时,应指定唯一的 UID。WebSphere 目前还不支持 RACF AUTOUID 功能。要查找未指定(并且重复)的 UID,请使用 ISPF ISHELL(选项 3.4)以获取按 UID 排列的所有用户标识的列表。您必须是超级用户(UID=0),并且必须遵循以下步骤:
  1. 选择设置下拉菜单和用户列表选项。
  2. 浏览用户列表。
  3. 在浏览用户列表时,选择文件下拉菜单。
  4. 选择排序 UID 选项。(注意,UID -1 意味着用户没有 OMVS 分段。)
以下示例说明包含的面板:
----------------------------------------------------------------------------------------
文件   目录   特殊文件   工具文件系统   选项   设置   帮助
----------------------------------------------------------------------------------------
UNIX 系统服务 ISPF Shell
命令 ===> _______________
----------------------------------------------------------------------------------------

-----------------------------
1. 用户...
2. 用户列表...
3. 所有用户...
4. 所有组...
5. 允许字段访问...
6. 字符特殊...
7. 将 UID 复位为 847039
-----------------------------

--------------------------------------------------------------------
文件  帮助
--------------------------------------------------------------------
                                                        用户列表
命令 ===>
--------------------------------------------------------------------
用户标识                UID                 组
--------------------------------------------------------------------
ADMOORE                 1024996             $GUSERS /u/admoore
AHMAD                   2                   DFSGRP /u/ahmad
AKILOV                  125406              $GUSERS /u/akilov
ALLMOND                 36                  DFSGRP /u/allmond
AOPUSER                 99129934            AOPOPER /u/aopuser
ASTLEY                  787202              DFSGRP /u/astley
A5USR                   112501              A5GRP /tmp
BAGWELL                 342832              DFSGRP /u/bagwell
---------------------------------------------------------------------

-----------------------------
1. 对名称排序
2. 对 UID 排序
3. 对组排序
4. 打印
5. 退出用户标识 UID 组
-----------------------------

-----------------------------------------------
用户标识                UID                 组
-----------------------------------------------
CBASRUH              2336             CBASRH
CBIVPH               2337             CBIVPGH
T5GUEST              2402             T5GUESG
T5ADMIN              2403             T5CFG
T5DMNU               2411             T5CFG
T5ACRNDU             2421             T5CFG
T5DMGSU              2422             T5SVRG
T5ASRNDU             2422             T5SVRG
T5ACRU               2431             T5CFG
T5ASRU               2432             T5SVRG
WSPETSC              2701             WSCNTLG
-----------------------------------------------

按 GID 顺序列示所有组标识

还应对新组指定唯一 GID。系统没有提供工具以按 GID 顺序(因为存在对应 GID 的顺序)列示组,因此您可以标识重复项并指定唯一的新 GID。将 GID 指定为唯一参数以便按 GID 顺序列示它们。缺省为按组标识顺序列示它们。 (您必须具有 RACF SPECIAL、AUDITOR 或其他特定权限。)
/* Rexx ---------------------------------------------------------- */
/* This exec uses the ishell bpxwirac service to display the group */
/* with OMVS segments and there group IDs. B. Pierce & MJ Loos */
/* --------------------------------------------------------------- */
/* Syntax: LISTGRP Name (default) | GID */
/* --------------------------------------------------------------- */
order = "N" /* set default to name */
Arg parm /* get argument for sort order */
if Abbrev("NAME",parm,1) then order = "N"
if Abbrev("GID",parm,1) then order = "I"

call bpxwirac "OMVSGROUP" /* call the service */

Address ISPEXEC /* using ISPF services */
if order = "N" then do /* already sorted */
   do ix=1 by 1 while queued()>0
      parse pull gname gid
      say left(gname,8) right(gid,8)
   end
end
else do /* sort the results */
   "TBCREATE grptable names(tbgrpnm tbgrpid) replace nowrite"
   rows = 0
   do ix=1 by 1 while queued()>0 /* populate the table */
      parse pull gname gid
      tbgrpnm = left(gname,8)
      tbgrpid = right(gid,8)
      "TBADD grptable"
      rows = rows + 1
   end
   "TBSORT grptable FIELDS(tbgrpid,C,A,tbgrpnm,C,A)" /* sort it */
   "TBTOP grptable"
   do ix = 1 to rows by 1 /* display the results */
      "TBSKIP grptable"
      say tbgrpnm tbgrpid
   end
   "TBEND grptable" /* throw out the table */
end
say
exit 0 
/***************** end of EXEC ****************************/

退出 RACF 定义

设置服务器、节点和单元(然后将这些对象删除)时,如果有一种简单的方法可用来删除在此过程中创建的 RACF 定义,就会很方便。

附加的 EXEC 从目标 .DATA 分区数据集的 BBOWBRAK 成员中读取生成的 RACF 命令,并创建 RACF DELUSER、DELGROUP、RDELETE 和其他 RACF 命令(按倒序)。

运行生成的 RACF 命令之前,应复审输出,并删除用来删除由要保留的其他服务器使用的用户、组或概要文件的任何命令。

提示: 一定要小心,不要删除其他服务器所使用的用户和一般概要文件。
/* REXX - UNDO2 - Create backout RACF commands to uninstall Server*/
Read RACF commands into linein.in, parse verb & Obj, push
"delete/undo" commands to cmdOut.out,then write out in rev order */
out = 1 /* Output line number for stem var. cmdOut. */
"EXECIO * DISKR RACFCMDS (STEM linein."
do in = 1 to linein.0 /* See what we read; call the appropriate rtne */
  if pos('/*',linein.in) <> 0 then iterate
  if pos('say',linein.in) = 1 then iterate
 parse var linein.in '"' cmdVerb cmdObj '"'
 select
   when cmdVerb = "ADDGROUP" then call DelGrp
   when cmdVerb = "ADDUSER" then call DelUsr
   when cmdVerb = "CONNECT" then call ConUsr
   when cmdVerb = "RDEFINE" then call DelPro
   when cmdVerb = "PERMIT" then call PerUsr
   when cmdVerb = "RACDCERT" then call RdCert
    otherwise iterate
  end /* select */
end /* in=1 to n */
call WriteCmds
exit 1
return

/*************** Subroutines: ********************/

DelUsr: /* DelUsr: Delete User */
   parse var cmdObj user .
   cmdOut.out = "DELUSER " || user
   out = out + 1
return

DelGrp: /* DelGrp: Delete Group */
   parse var cmdObj group .
   cmdOut.out = "DELGROUP " || group
   out = out + 1
return

ConUsr: /* ConUsr: Remove user from a group */
   cmdOut.out = "REMOVE " || cmdObj
   out = out + 1
return

DelPro: /* DelPro: Delete Profile */
   parse var cmdObj class profile acc .
   cmdOut.out = "RDELETE " || class profile
   out = out + 1
return

PerUsr: /* PerUsr: Remove permission from a profile */
   parse var cmdObj profile class ID acc
   parse value cmdObj with 'ID(' id ')' acc
   cmdOut.out = 'PERMIT '||profile class||' ID('||ID||') DELETE'
   out = out + 1
return

RdCert: /* RdCert: Remove Certificates */
if pos('GENCERT',cmdObj) <> 0 then
  DO
   if pos('CERTAUTH',cmdObj) <> 0
    then
     DO
      parse value cmdObj with 'WITHLABEL(' cert ')'
      cmdOut.out = 'RACDCERT CERTAUTH DELETE(LABEL(' || cert || '))'
      out = out + 1
     END
    ELSE DO
     parse value cmdObj with 'WITHLABEL(' cert ')'
     parse value cmdObj with 'ID (' id ')'
     cmdOut.out = 'RACDCERT ID('||id||') DELETE(LABEL('||cert||'))'
     out = out + 1
     END
  END
if pos('ADDRING',cmdObj) <> 0 then
  DO
   parse value cmdObj with 'ADDRING(' ringname ')'
   parse value cmdObj with 'ID(' user ')'
   cmdOut.out = 'RACDCERT DELRING('||ringname') ID('||user')'
   out = out + 1
  END
return

/* Finished - pull LIFO stack and Write it out *******************/
WriteCmds:
 DO i = out-1 to 1 by -1
   QUEUE cmdOut.i
   EXECIO 1 DISKW RACFUNDO
 END
return

指示主题类型的图标 参考主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rsec_racftools
文件名:rsec_racftools.html