OCM_Session7_2_创建组,用户,设置用户密码
2014-03-23 09:12
537 查看
二、创建组,用户,设置用户密码
在OCM环境中,用户和用户组也已经配置好。我们只需要查看 id oracle。
参考官方文档:http://docs.oracle.com/cd/B19306_01/install.102/b14203/prelinux.htm
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.
The
Oracle 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 created
them, then create the user and groups with the same name and ID on the other cluster nodes.
Identifying
the 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
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
Enter commands similar to the following to create the
to specify the correct GID for each group.
# /usr/sbin/groupadd -g 200 oinstall
# /usr/sbin/groupadd -g 201 dba
# /usr/sbin/groupadd -g 202 oper
Note:
If the group already exists, then use the
on 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
# /usr/sbin/useradd -u 200 -g oinstall -G dba[,oper] oracle
In the preceding command:
The
The
The
Note:
If the
on this node, then view the
of the nodes.
Set the password of the
# passwd oracle
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
我的修改如下:
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /home/oracle oracle
passwd oracle
------------------------------------------------------------------------------------------------
rac1节点
[root@rac1 ~]# groupadd oinstall
[root@rac1 ~]# groupadd dba
[root@rac1 ~]# useradd -g oinstall -G dba -d /home/oracle oracle
[root@rac1 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@rac1 ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
[root@rac1 ~]#
--------------------------------------------------------------------------------------------------
rac2节点
[root@rac2 ~]# groupadd oinstall
[root@rac2 ~]# groupadd dba
[root@rac2 ~]# useradd -g oinstall -G dba -d /home/oracle oracle
[root@rac2 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@rac2 ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
[root@rac2 ~]#
在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.
The
Oracle 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 created
them, then create the user and groups with the same name and ID on the other cluster nodes.
Identifying
the 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
oracleuser 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
oinstalland
dbagroups, and if required, the
opergroup. Use the
-goption
to specify the correct GID for each group.
# /usr/sbin/groupadd -g 200 oinstall
# /usr/sbin/groupadd -g 201 dba
# /usr/sbin/groupadd -g 202 oper
Note:
If the group already exists, then use the
groupmodcommand to modify it if necessary. If you cannot use the same group ID for a particular group on this node, then view the
/etc/groupfile
on 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
oracleuser, enter a command similar to the following:
# /usr/sbin/useradd -u 200 -g oinstall -G dba[,oper] oracle
In the preceding command:
The
-uoption specifies the user ID, which must be the user ID that you identified in the previous subsection
The
-goption specifies the primary group, which must be the Oracle Inventory group, for example
oinstall
The
-Goption specifies the secondary groups, which must include the OSDBA group and if required, the OSOPER group. For example:
dbaor
dba,oper
Note:
If the
oracleuser already exists, then use the
usermodcommand to modify it if necessary. If you cannot use the same user ID for the
oracleuser
on this node, then view the
/etc/passwdfile on all nodes to identify a user ID that is available on every node. You must then specify that ID for the user on all
of the nodes.
Set the password of the
oracleuser:
# passwd oracle
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
我的修改如下:
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba -d /home/oracle oracle
passwd oracle
------------------------------------------------------------------------------------------------
rac1节点
[root@rac1 ~]# groupadd oinstall
[root@rac1 ~]# groupadd dba
[root@rac1 ~]# useradd -g oinstall -G dba -d /home/oracle oracle
[root@rac1 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@rac1 ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
[root@rac1 ~]#
--------------------------------------------------------------------------------------------------
rac2节点
[root@rac2 ~]# groupadd oinstall
[root@rac2 ~]# groupadd dba
[root@rac2 ~]# useradd -g oinstall -G dba -d /home/oracle oracle
[root@rac2 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@rac2 ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
[root@rac2 ~]#
相关文章推荐
- 创建用户,设置密码(长度是否大于等于7)
- linux创建用户、设置密码
- linux 创建用户、设置密码、修改用户、删除用户
- 批量创建linux用户并设置初始密码
- shell脚本创建用户并设置密码
- linux 创建、修改、删除用户,以及设置密码
- 4-7使用while批量创建用户并设置密码
- 【树莓派开发-Linux】linux创建用户、设置密码、修改用户、删除用户
- linux创建用户、设置密码、修改用户、删除用户
- 批量创建10个系统用户,并且设置随机数密码
- Linux 创建用户的同时设置密码
- linux学习笔记-批量创建用户并设置随机密码
- Shell脚本——创建用户和设置密码
- linux创建用户、设置密码
- linux创建用户、设置密码、修改用户、删除用户
- linux创建用户、设置密码、修改用户、删除用户
- Linux创建用户、设置密码
- 创建用户、设置密码、修改用户、删除用户.
- linux创建用户、设置密码、修改用户、删除用户: