Thursday, May 19, 2011

NIS Configuration

Nis Server Configuration for RHEL-5

Server side-: Install following package.
# yum install Ypserv
# yum install Ypbind
# yum install tools
# chkconfig ypserv on
# chkconfig yppasswdd on
# chkconfig ypxfrd on
# /etc/init.d /portmap restart
# chkconfig portmap on
Open file vim /etc/sysconfig/network
make this entry in file.

NISDOMAIN= ABC    "abc is a domian name"
save & exit file.
# service ypserv restart
# service yppasswd start
Make new user
adduser "username"
passwd "enter password"
enter new password “typpe new password”
retype new password “retype new password”
*remote home directory-:
# mkdir /abc
#chmod 777 /abc

#creaton of the user #
useradd -d /abc/test1 test1
passwd test1
useradd -d /abc/test2 test2
passwd test2
* type following command-:
# /usr/lib/yp/ypinit -m
 It will ask u next host to add#
Press CTR+D#
you will get below message #
The current list of NIS servers looks like this:
linux1.abc.com
Is this correct? [y/n: y]
#
#Press Y#

#Set nfs services to automatic#
chkconfig nfs on
chkconfig portmap on
chkconfig nfslock on


vim /etc/exports
 make the following entry to share abc folder

/abc    *.192.168.10.0/24(rw,sync)

vim /etc/sysconfig/nfs
#make following entries in this file#
MOUNTD_PORT="4002"
STATD_PORT="4003"
LOCKD_TCPORT="4004"
LOCKD_UDPPORT="4004"
/etc/init.d/nfs restart
/etc/init.d/nfslock restart
/etc/init.d/portmap restart
exportfs -avf
show the exported folder
Client Side-:
now configure auto.misc and auto.master on client machine
make following entry in auto.misc
* -rw,soft,intr serveripaddress:/abc/&
make following entry in auto.master
/testhome etc/auto.misc
/etc/init.d/autofs restart
now run authconfig-tui
select nis domain
put ABC in domain fiels
server's ipaddress in server field
now login with user test1 from client machine in cmd prompt

No comments: