Tuesday, May 17, 2011

Network Information System (NIS)


NIS server configuration involves the following steps:
1. Setting the NIS domain name.
2. Configuring and starting the server daemon, ypbind.
3. Initializing the NIS maps.
4. Starting the NIS password daemon.
5. Starting the NIS transfer daemon if you use slave servers.
6. Modifying the startup process to start the NIS daemons when the system
reboots.
With the NIS domain name set, at least temporarily, you can configure and start the primary NIS server daemon. The key configuration files are /var/yp/securenets and /etc/ypserv.conf. /etc/ypserv.conf is the configuration file for both ypserv, the primary NIS server daemon, and the NIS transfer daemon, ypxfrd. It contains runtime configuration options, called option lines, for ypserv, and host access information, called access rules, for both ypserv and ypxfrd. The default values in /etc/ypserv.conf, which are shown in Listing below, are sufficient for most NIS server configurations.  The Default ypserv.conf File Values for Red Hat Linux
dns:no
*:shadow.byname:port:yes
*:passwd.adjunct.byname:port:yes
*:*:none
——————————————————————————————————————————-
Network Information Service is the most common used authentication service along with LDAP.
NIS is used to managae users centrally.
NIS was originally called as YellowPages or YP
Developed by SUN Microsystems.
Maintains a central directory of USers,groups,hostnames,email aliases,etc in  a computer network.
SERVER SIDE
Packages required :   ypserv*, ypbind*, yptools*
Ypserv and ypbind are also required at client side
Port Number : Uses random ports.
To chk the port number  use command   rpcinfo -p
Configuration file :  /var/yp/MakeFile
Database : MAPS
give the NISDOMAINNAME  in  /etc/sysconfig/network file.
Edit the /etc/hosts file   by assigning the IPaddress to the NIS Domain Name
ex:   192.168.0.5   nisserver.abc.com    misserver
Change the system NIS DOMAIN NAME
#nisdomainname  nisserver
Now goto /var/yp/MakeFile and edit the following options
(line no:23)            NOPUSH=TRUE
(line no:109)           all:passwd group hosts\
Now restart the service ypserv
the command to craete the NIS database is
#/usr/lib/yp/ypinit -m
Now restart the service     yppasswdd   (This invokes the database)
NOW create the some users with passwords.
#make
This makes database update about the creation or deletion of entries in NIS database
#service yppasswdd restart
CLIENT SIDE
install the packages ypbind and yptools
#authconfig-tui
select USE NIS and next
give the domain name and server ip address
#ypwhich
CONFIGURATION OF NFS WITH NIS   at SERVER SIDE:
#Vi /etc/exports
/home     192.168.0.0/24(rw,sync)
save and exit
#Service nfs restart
CLIENT SIDE
No login as user reated in server  using su -
mount the shared(/home) directory in client
now chk by creating the files or folders.
The files and folders get stored in /home direcory of NIS server.

This the way to configure NIS Domain Name.