This article involves nis server and client settings 1. server Part 1. edit/etc/rc. local and add nisdomainnamejohn in the last line. (Of course, your nisdomainname may be different from mine .) 2. edit/etc/sysconfig/network. the following red font indicates the NETWORKING = yesNETWORK to be modified or added.
This article involves nis server and client settings
I. server part
1. edit/etc/rc. local and add nisdomainname john in the last line. (Of course, your nisdomainname may be different from mine .)
2. edit/etc/sysconfig/network. the following red font must be modified or added.
NETWORKING = yes
NETWORKING_IPV6 = no
HOSTNAME = master
NISDOMAIN = john
3. set/etc/hosts and add the following content to the end of the file:
192.168.1.4 master
192.168.1.5 client
4. package as needed
Yum install ypserv
5. modify the main configuration file/etc/ypserv. conf and delete the logout character before the last line, as shown below.
*: None
6. start the service
Service portmap start
Service ypserv start
Service yppasswdd start
7. create a test user
Useradd nisuser
Passwd nisuser
8. create a database and run the command/usr/lib/yp/ypinit-m.
OK. so far, the server has been set.
II. client
1. install the nis client
Yum install ypbind
2. set/etc/hosts and add the following content to the end of the file:
192.168.1.4 master
192.168.1.5 client
3. edit/etc/sysconfig/network. the following red font must be modified or added.
NETWORKING = yes
NETWORKING_IPV6 = no
HOSTNAME = client
NISDOMAIN = john
4. edit/etc/rc. local and add nisdomainname john to the last line.
5. set the authentication method, run the authconfig-tui command, and select "Use NIS"
The client has ended.
III. test
Log on to the client using nisuser:
Of course, because the directory/home/nisuser does not exist on the client, there will be a "No directory/home/nisuser !" Prompt