Configure the NIS server and client under FC6 and RHEL5

Source: Internet
Author: User
In FC6 and RHEL5, configure the NIS server and client-Linux Enterprise Application-Linux server application information. The following is a detailed description. NIS Server Configuration
1. First, confirm to disable iptables.
#/Etc/init. d/iptables stop
# Chkconfig iptables off

2. Install the ypbind package and make sure you run the following command online
# Yum install-y ypserv ypbind portmap yp-tools

3. Add the following configuration to/etx/sysconfig/network:
NISDOMAIN = "FC6"

4. Modify/etc/yp. conf and add the following settings.
Ypserv 127.0.0.1

5. Execute the following command.
#/Etc/init. d/portmap start
#/Etc/init. d/yppasswdd start
#/Etc/init. d/ypserv start
# Chkconfig portmap on
# Chkconfig yppasswdd on
# Chkconfig ypserv on

6 Modify/var/yp/Makefile
All: passwd group hosts rpc services netid protocols mail
Change
All: passwd group hosts rpc services netid protocols mail auto. master auto. home

7. Add the users we need.
# Adduser clf
# Adduser lief
# Passwd clf
# Passwd lief

8. Run the following command:
# Touch/etc/auto. home
#/Usr/lib/yp/ypinit-m
Press Ctrl-D and answer Y to perform the next operation.
# Cd/var/yp
# Make

9 run now
Authconfig -- update -- enablenis
If a problem occurs in this step, perform Step 8 again.

11 if 9 passes smoothly, execute the following command and you can see the User Password table
# Getent passwd

Share the home Directory through NFS
1 first disable SeLinux and modify/etc/sysconfig/selinux
SELINUX = disabled
Restart the server

2. Add/etc/exports
/Home * (rw)

3. Restart NFS.
#/Etc/init. d/nfs restart

4. Execute the exportfs command on the local machine. The following output is displayed.
/Home

5. Modify/etc/auto. master, comment out all previous configurations, and add
/Home auto. home

6. Create the/etc/auto. home file. Replace servername with your host name.
*-Rw, sync servername:/home &

7. Execute the following command
# Cd/var/yp
# Make
#/Etc/init. d/ypserv restart

8 run now
# Ypcat auto. master should be visible
Auto. home

9 run
Ypcat auto. home can be seen
-Rw, sync servername:/home /&

If everything works normally after Step 9 is executed, The autofs of the NIS server is configured.

Client Configuration
1. Install the ypbind package on the client
# Yum install-y ypbind yp-tools

2. Execute system-config-authentication. Select Enable NIS and click Configure to enter the addresses of the NIS domain and NIS server according to the settings we just set. then click OK to confirm and exit.

3. Now run
Getent passwd
The password table on the server should be output

4. Modify/etc/auto. master to comment out all the configurations and ensure that the configurations contain
+ Auto. master
This line of configuration tells NIS to obtain the autofs ing table from the server.

5. Restart the ypbind service.
#/Etc/init. d/ypbind restart
# Chkconfig ypbind on

6 restart autofs
#/Etc/init. d/autofs restart
# Chkconfig autofs on

At this point, you can use the user name and password on the server to log on to the client system.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.