NIS SERVER
Network Information Service
NIS is centralized users authentication service. It maintains centralized login and domain database Such as /etc/passwd /etc/group, /etc/shadow, /etc/services, /etc/host etc….
NIS Servers can be configured Master and Slave servers for High availability.
NIS depends on RPC protocol.
Packages : ypserv
ypbind
yp-tool
Script : /var/yp/Makefile
Services : ypserv
yppasswdd
portmap
Port number : (It uses random port numbers)
Daemon : yppasswdd
Configuration of NIS (Network Information Service)
Current NIS server IP is 192.168.0.20
Step 1: CHECK IP & HOST ENTRIES
[root@client ~]# ifconfig
[root@client ~]# netconfig
[root@client ~]# service network restart [root@client ~]# ping 192.168.0.0 -b
[root@client ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=nisserver.zoom.com NISDOMAIN=zoom.com
:wq!
[root@client ~]# vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.1 nisserver.zoom.com nisserver
:wq!
[root@client ~]# nisdomainname zoom.com
[root@client ~]# hostname nisserver.zoom.com
[root@client ~]# hostname
nisserver.zoom.com
* NOW LOG OFF & LOG IN *
Step 2 : CHECK & INSTALL THE PACKAGES
[root@nisserver ~]# rpm -qa yp*
or
[root@nisserver ~]# yum list installed yp*
[root@nisserver ~]# yum remove yp* -y
[root@nisserver ~]# rm -r /var/yp*
Now Install the packages
[root@nisserver ~]# yum install yp* -y
Step 3) Edit Main Configuration File
[root@station9 ~]# vi /var/yp/Makefile
NOPUSH=true ## 23
all: passwd group hosts \ ## 109
:wq!
Step 4 ) Start the service
[root@station9 ~]# service ypserv restart
Step 5 ) Create NIS maps i.e NIS database
[root@station9 ~]# /usr/lib/yp/ypinit -m ## -m -->master
NOTE : NIS database is stored in /var/yp
[root@station9 ~]# useradd joy
[root@station9 ~]# passwd tom
[root@station9 ~]# passwd joy
[root@station9 ~]# ls
[root@station9 ~]# make
[root@station9 ~]# service pyserv restart
[root@station9 ~]# service yppasswdd restart
Configuration of NFS with NIS
[root@nisserver ~]# yum install nfs* -y
[root@nisserver ~]# vi /etc/exports
/home 192.168.0.0/24(rw,sync)
:wq!
[root@nisserver ~]# service nfs restart
[root@nisserver ~]# showmount -e 192.168.0.X ## X is NFS
servers IP
CLIENT SIDE CONFIGURATION
Step 1: CHECK IP & HOST ENTRIES
[root@client ~]# ifconfig
[root@client ~]# netconfig
[root@client ~]# service network restart [root@client ~]# ping 192.168.0.0 -b
[root@client ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=nisclient.zoom.com NISDOMAIN=zoom.com
:wq!
[root@client ~]# vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.1 nisclient.zoom.com nisclient
:wq!
[root@client ~]# nisdomainname zoom.com
[root@client ~]# hostname nisclient.zoom.com
[root@client ~]# hostname
nisclient.zoom.com
* NOW LOG OFF & LOG IN *
Step 2 ) Make the client Machine as Member of NIS-Server
Network Information Service
NIS is centralized users authentication service. It maintains centralized login and domain database Such as /etc/passwd /etc/group, /etc/shadow, /etc/services, /etc/host etc….
NIS Servers can be configured Master and Slave servers for High availability.
NIS depends on RPC protocol.
Packages : ypserv
ypbind
yp-tool
Script : /var/yp/Makefile
Services : ypserv
yppasswdd
portmap
Port number : (It uses random port numbers)
Daemon : yppasswdd
Configuration of NIS (Network Information Service)
Current NIS server IP is 192.168.0.20
Step 1: CHECK IP & HOST ENTRIES
[root@client ~]# ifconfig
[root@client ~]# netconfig
[root@client ~]# service network restart [root@client ~]# ping 192.168.0.0 -b
[root@client ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=nisserver.zoom.com NISDOMAIN=zoom.com
:wq!
[root@client ~]# vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.1 nisserver.zoom.com nisserver
:wq!
[root@client ~]# nisdomainname zoom.com
[root@client ~]# hostname nisserver.zoom.com
[root@client ~]# hostname
nisserver.zoom.com
* NOW LOG OFF & LOG IN *
Step 2 : CHECK & INSTALL THE PACKAGES
[root@nisserver ~]# rpm -qa yp*
or
[root@nisserver ~]# yum list installed yp*
[root@nisserver ~]# yum remove yp* -y
[root@nisserver ~]# rm -r /var/yp*
Now Install the packages
[root@nisserver ~]# yum install yp* -y
Step 3) Edit Main Configuration File
[root@station9 ~]# vi /var/yp/Makefile
NOPUSH=true ## 23
all: passwd group hosts \ ## 109
:wq!
Step 4 ) Start the service
[root@station9 ~]# service ypserv restart
Step 5 ) Create NIS maps i.e NIS database
[root@station9 ~]# /usr/lib/yp/ypinit -m ## -m -->master
NOTE : NIS database is stored in /var/yp
Step 6 ) Start the service so that NIS database get's Activated
[root@station9 ~]# service yppasswdd restartStep 7) Create new users
[root@station9 ~]# useradd tom[root@station9 ~]# useradd joy
[root@station9 ~]# passwd tom
[root@station9 ~]# passwd joy
Step 8) If a new user/group/password's are created or modified, then the NIS database has to be manually updated.
NOTE : Go to /var/yp & run a command make [root@station9 ~]# cd /var/yp[root@station9 ~]# ls
[root@station9 ~]# make
Step 9) NOTE : If a database contents are modified then again restart services
[root@station9 ~]# service pyserv restart
[root@station9 ~]# service yppasswdd restart
Configuration of NFS with NIS
[root@nisserver ~]# yum install nfs* -y
[root@nisserver ~]# vi /etc/exports
/home 192.168.0.0/24(rw,sync)
:wq!
[root@nisserver ~]# service nfs restart
[root@nisserver ~]# showmount -e 192.168.0.X ## X is NFS
servers IP
CLIENT SIDE CONFIGURATION
Step 1: CHECK IP & HOST ENTRIES
[root@client ~]# ifconfig
[root@client ~]# netconfig
[root@client ~]# service network restart [root@client ~]# ping 192.168.0.0 -b
[root@client ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=nisclient.zoom.com NISDOMAIN=zoom.com
:wq!
[root@client ~]# vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.1 nisclient.zoom.com nisclient
:wq!
[root@client ~]# nisdomainname zoom.com
[root@client ~]# hostname nisclient.zoom.com
[root@client ~]# hostname
nisclient.zoom.com
* NOW LOG OFF & LOG IN *
Step 2 ) Make the client Machine as Member of NIS-Server
[root@station20 ~]# authconfig-tui

[root@station20 ~]# ypwhich
[root@station20 ~]# mount 192.168.0.20:/home /home nisserver.zoom.com
[root@station20 ~]#
Now log in as a NIS server user
[root@station20 ~]# su - tom
[tom@station20 ~]$
No comments:
Post a Comment