设为首页 收藏本站
查看: 1781|回复: 0

[经验分享] OCM_Session7_2_创建组,用户,设置用户密码

[复制链接]

尚未签到

发表于 2015-11-9 13:22:58 | 显示全部楼层 |阅读模式
  
二、创建组,用户,设置用户密码 在OCM环境中,用户和用户组也已经配置好。我们只需要查看 id oracle。
参考官方文档:http://docs.oracle.com/cd/B19306_01/install.102/b14203/prelinux.htm
2.4.6 Creating Identical Users and Groups on Other Cluster Nodes
Note:
You must complete the following procedures only if you are using local users and groups. If you are using users and groups defined in a directory service such as NIS, then they are already identical on each cluster node.  TheOracle software owner user and the Oracle Inventory, OSDBA, and OSOPER groups must exist and be identical on all cluster nodes. To create these identical users and groups, you must identify the user ID and group IDs assigned them on the node where you createdthem, then create the user and groups with the same name and ID on the other cluster nodes.
Identifyingthe User and Group IDs
  To determine the user ID (UID) of the Oracle software owner user and the group IDs (GID) of the Oracle Inventory, OSDBA, and OSOPER groups, follow these steps:

  •   Enter following command:
    # id oracle  The output from this command is similar to the following:
    uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)
  •   From the output, identify the user ID (UID) for the oracle user and the group identities (GIDs) for the groups to which it belongs.
Creating the User and Groups on the Other Cluster Nodes
  To create the user and groups on the other cluster nodes, repeat the following procedure on each node:

  •   Log in to the next cluster node as root.
  •   Enter commands similar to the following to create the oinstall and dba groups, and if required, the oper group. Use the -g optionto specify the correct GID for each group.
    # /usr/sbin/groupadd -g 200 oinstall # /usr/sbin/groupadd -g 201 dba # /usr/sbin/groupadd -g 202 operNote:
    If the group already exists, then use the groupmod command to modify it if necessary. If you cannot use the same group ID for a particular group on this node, then view the /etc/group fileon all nodes to identify a group ID that is available on every node. You must then specify that ID for the group on all of the nodes.
  •   To create the oracle user, enter a command similar to the following:
    # /usr/sbin/useradd -u 200 -g oinstall -G dba[,oper] oracle  In the preceding command:

    •   The -u option specifies the user ID, which must be the user ID that you identified in the previous subsection
    •   The -g option specifies the primary group, which must be the Oracle Inventory group, for example oinstall
    •   The -G option specifies the secondary groups, which must include the OSDBA group and if required, the OSOPER group. For example: dba or dba,oper
      Note:
      If the oracle user already exists, then use the usermod command to modify it if necessary. If you cannot use the same user ID for the oracle useron this node, then view the /etc/passwd file on all nodes to identify a user ID that is available on every node. You must then specify that ID for the user on allof the nodes.

  •   Set the password of the oracle user:
    # passwd oracle ----------------------------------------------------------------------------------------------------------------------------------------------------------------------

    我的修改如下:

groupadd oinstallgroupadd dbauseradd  -g oinstall -G dba -d /home/oracle oraclepasswd oracle
------------------------------------------------------------------------------------------------rac1节点
[iyunv@rac1 ~]# groupadd oinstall[iyunv@rac1 ~]# groupadd dba[iyunv@rac1 ~]# useradd  -g oinstall -G dba -d /home/oracle oracle[iyunv@rac1 ~]# passwd oracleChanging password for user oracle.New UNIX password: BAD PASSWORD: it is based on a dictionary wordRetype new UNIX password: passwd: all authentication tokens updated successfully.[iyunv@rac1 ~]# id oracleuid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)[iyunv@rac1 ~]# --------------------------------------------------------------------------------------------------rac2节点
[iyunv@rac2 ~]# groupadd oinstall[iyunv@rac2 ~]# groupadd dba[iyunv@rac2 ~]# useradd  -g oinstall -G dba -d /home/oracle oracle[iyunv@rac2 ~]# passwd oracleChanging password for user oracle.New UNIX password: BAD PASSWORD: it is based on a dictionary wordRetype new UNIX password: passwd: all authentication tokens updated successfully.[iyunv@rac2 ~]# id oracleuid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)[iyunv@rac2 ~]#   
         版权声明:本文为博主原创文章,未经博主允许不得转载。

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-137077-1-1.html 上篇帖子: OCM 考试流程 下篇帖子: 100% genuine OCP
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表