Fedora 21
Sponsored Link

Configure NIS Client
2014/12/23
 
Configure NIS Client.
This example is based on the environment below.
+----------------------+          |          +----------------------+
| [    NIS Server    ] |10.0.0.30 | 10.0.0.31| [    NIS Client    ] |
|     dlp.srv.world    +----------+----------+     www.srv.world    |
|                      |                     |                      |
+----------------------+                     +----------------------+

[1] Configure NIS Client.
[root@www ~]#
yum -y install ypbind rpcbind
# set NIS domain

[root@www ~]#
ypdomainname srv.world

[root@www ~]#
echo "NISDOMAIN=srv.world" >> /etc/sysconfig/network

[root@www ~]#
vi /etc/hosts
# add NIS server and own IP address

10.0.0.30   dlp.srv.world dlp
10.0.0.31   www.srv.world www

[root@www ~]#
authconfig \
--enablenis \
--nisdomain=srv.world \
--nisserver=dlp.srv.world \
--update
# add optionally if you need

# create home directory automatically if it's none

[root@www ~]#
vi /etc/pam.d/system-auth
# add follows to the end

session     optional      pam_mkhomedir.so skel=/etc/skel umask=077

[root@www ~]#
systemctl start rpcbind

[root@www ~]#
systemctl start ypbind

[root@www ~]#
systemctl enable rpcbind

[root@www ~]#
systemctl enable ypbind

[root@www ~]#
www login:
fedora
# the user on NIS

Password:
# NIS password

Creating directory '/home/fedora'.
[fedora@www ~]$
# just logined
# confirm connected NIS server

[fedora@www ~]$
dlp.srv.world
# confirm to changing password

[fedora@www ~]$
Changing NIS account information for fedora on dlp.srv.world.
Please enter old password:
# current password

Changing NIS password for fedora on dlp.srv.world.
Please enter new password:
# new password

Please retype new password:
The NIS password has been changed on dlp.srv.world.
Matched Content
 
Tweet