Friday, May 14, 2010

Configure Setup NIS Server | Setup NIS Server

NIS Network Information Authentication is used for maintain the Network Authentication.NIS server it will handle the all the source file for user authentication /etc/passwd /etc/group /etc/hosts.
Install Ypserv Package For Maintain The NIS
[script@redhat yp]# yum install yp*
Installed:
ypserv.i386 0:2.19-5.el5
File /etc/redhatconfig/network file is used to configure or setup Network on the server.Add the last line NISDOMAIN=rhel5
[script@redhat html]# vim /etc/redhatconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=redhat.localdomain
NISDOMAIN=rhel5
[script@redhat yp]# vi /var/yp/Makefile
Int the 109 line [ Line number may change so you can search word hosts]
ll: passwd group hosts rpc services netid protocols mail \
Add # symbol before the hosts
ll: passwd group #hosts rpc services netid protocols mail \
Restart the Following service
[script@redhat ~]# service portmap restart
[script@redhat ~]# service ypserv restart

Then run the /usr/lib/yp/ypinit -m command it will ask what are host add to the nis client

[script@redhat yp]# /usr/lib/yp/ypinit -mAt this point, we have to construct a list of the hosts which will run NIS
servers. redhat.example.com is in the list of NIS server hosts. Please continue to add
the names for the other hosts, one per line. When you are done with the
list, type a .
next host to add: redhat.example.com
next host to add:
Just type (ctrl+d)
The current list of NIS servers looks like this:
redhat.example.com
Is this correct? [y/n: y] y [Type Y-yes then it will build the database]
We need a few minutes to build the databases...
Building /var/yp/rhel5/ypservers...
Running /var/yp/Makefile...
gmake[1]: Entering directory `/var/yp/rhel5'
Updating passwd.byname...
Updating passwd.byuid...
Updating group.byname...
Updating group.bygid...
gmake[1]: Leaving directory `/var/yp/rhel5'



redhat.example.com has been set up as a NIS master server.


Now you can run ypinit -s redhat.example.com on all slave server.


Here red hat as system name, example.com as domain name for DNS setting not NIS Here it will not use.NIS Domain name as rhel5


Start the yppasswdd service it will update there username and there password.


[script@redhat yp]# service yppasswdd start


Starting YP passwd service: [ OK ]


After yppasswd service start


it will create the folder as rhel5 in /var/yp directory.


/var/yp/rhel5


yppasswdd it is used to update the client password in the database


After start the service add the user.


now I add the user as nisclient in NIS server.

[script@redhat yp]# useradd nisclient
[script@redhat yp]# passwd nisclient
Changing password for user nisclient.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

Update The Ypserv Database File


[script@redhat yp]# cd /var/yp/


[script@redhat yp]# make [Make command it will update the Database file]


gmake[1]: Entering directory `/var/yp/rhel5'


Updating passwd.byname...


Updating passwd.byuid...


Updating group.byname...


Updating group.bygid...


gmake[1]: Leaving directory `/var/yp/rhel5'


It will update the nis user name and there password.

0 comments:

Flag counter

free counters