|
24.2.2 创建表格
在master1服务器上为Doc.Com.域创建了根域服务器之后,下一步的工作就是创建NIS+表,为此,需要使用nispopulate命令。
标准的NIS+表格有:auto_master, auto_home, ethers, group, hosts, networks, passwd, protocols, services, rpc, netmasks, bootparams, netgroup和aliases。
在创建NIS+表格之前需要做下面两件事:
(1)启动根域主服务器。
# svcadm enable network/rpc/nisplus:default
(2)为了安全起见,将/etc目录下的网络和用户配置文件都拷贝到另一目录,然后从这个目录进行数据转换工作。本例中拷贝到/etc/nis+file目录。
创建NIS+表格的基本步骤如下:
(1)如果从文件中将数据移到NIS+表格中,使用下面命令。
master1# nispopulate -F -p /nis+files -d doc.com.
NIS+ domain name : doc.com.
Directory Path : /nis+files
Is this information correct? (type ’y’ to accept, ’n’ to change)
其中-F选项的意思是数据来源于文件;-p指明文件位置;-d选项指明NIS+域的名字。还要注意必须以root账户执行这个命令。
(2)如果显示信息正确,请键入“y”。
Is this information correct?
(type ’y’ to accept, ’n’ to change)
y
This script will populate the following NIS+ tables for domain doc.com. from
the files in /nis+files: auto_master auto_home ethers group hosts networks
passwd protocols services rpc netmasks bootparams netgroup aliases shadow
**WARNING: Interrupting this script after choosing to continue may leave
the tables only partially populated. This script does not do any automatic
recovery or cleanup.
Do you want to continue? (type ’y’ to continue, ’n’ to exit this script)
(3)如果显示信息正确,请键入“y”。
Do you want to continue? (type ’y’ to continue, ’n’ to exit this script)
y
populating auto_master table from file /nis+files/auto_master
... auto_master table done.
populating auto_home table from file /nis+files/auto_home
... auto_home table done.
Credentials have been added for the entries in the hosts and passwd table(s).
Each entry was given a default network password (also known as a Secure-
RPC password). This password is: nisplus
Use this password when the nisclient script requests the network password.
Done!
请记住Secure-RPC password,在本例中为nisplus,在下面设置客户机的时候需要用到这个口令。
现在所有数据都被转移过来了。
(4)使用下面命令来检查这个域。
master1# nisping -C doc.com.
Checkpointing replicas serving directory doc.com.
Master server is master1.doc.com.
Last update occurred at date
Master server is master1.doc.com.
checkpoint scheduled on master1.doc.com.
这一步说明,文件中的数据被转化为表格后,已经被域的服务所支持。
|