LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Blogs > Kashif Aziz Awan
User Name
Password

Notices

Rate this Entry

NIS Domain Solaris9 How to

Posted 02-17-2011 at 06:06 AM by kashifazizawan
Updated 04-28-2011 at 05:20 AM by kashifazizawan

Setting up NIS Domain (Solaris-9)
How to
OS: SunOS
Distribution: Solaris-9
System: X86
Date: January 06, 2011
Prerequisite: minimal install
Author: Kashif Aziz Awan
kashif_khb@yahoo.com
Version: 5.9 Generic
Introduction
The Network Information System (NIS) is a safe environment for sharing data among large number of
network (Internet or Intranet) users. Also, this environment provides a secure and controlled access to
the shared data.
When/Where to use NIS
Domain Client(SunOS) Network

- Medium level.
Downloads:-
Solaris-9 for X86
http://distro.ciit.net.pk/solaris/so...ga-x86-iso.zip
Software packages CDs:
http://distro.ciit.net.pk/solaris/so...x86-v1-iso.zip
http://distro.ciit.net.pk/solaris/so...x86-v2-iso.zip
Download and install Solaris 9 as well install both software packages CDs; all required
software will be installed.
Configuring NIS Master System:-
Login as root:
1- Define NIS domainname (test.test is domain name)
#domainname test.test
2- Populate the /etc/defaultdomain file with the domainname.
#domainname > /etc/defaultdomain
3- Configure the NIS configuration file:
#cp /etc/nsswitch.nis /etc/nsswitch.conf
4- Edit the /etc/hosts file to ensure that the NIS master and all NIS slave servers have
been defined and that a fully qualified name exists for this server
#Vi /etc/hosts
5- Initialize the Server:
#cd /var/yp
#/usr/sbin/ypinit -m
Out put will be look like this:-
There will be no further question. The remainder of the procedure should take 5 to 10 minuter.
Building /var/yp/mcslp.pri/ypservers…
Running /var/yp /Makefile…
Updated passwd
Updated group
Updated hosts
Updated ipnodes
Updated ethers
Updated networks
Updated rpc
Updated protocols
Updated bootparms
6- Update database
#cd /var/yp
#/usr/ccs/bin/make
7- Share home drives:
Share home drives of users using NFS file sharing
Edit dfstab
#vi /etc/dfs/dfstab
Add following lines:
Share –o rw=client1:client2:client3 /export/home
or
share -F nfs -o rw anon=0 /export/home
anon=0 is saying that all unknown users will get uid of 0.
#share
- /export/home rw=client1:client2 “home drive”
6- Edit /etc/auto_home, will be look like this:
#Cat /etc/auto_home
#Home directory map for automounter
#
+auto_home
test1 server1:/export/home/test1
test2 server1:/export/home/test2
test3 server1:/export/home/test3
--------------EOF-----------------
*(test1, test2 & test3 are user names and server1 is NIS server name)
6- Edit /etc/auto_master, will be look like this:
#Cat /etc/auto_master
#Master map for automounter
#
+auto_master
/net -hosts -nosuid,nobrowse
/home auto.home -nobrowse
#/xfn -xfn -nobrowse
--------------EOF-----------------
Test automount feature
#automount –v
#/usr/lib/netsvc/yp/ypstart
Adding a New NIS User
Add a local user by means of the useradd command or admintool.
For example:
#useradd –s /bin/bash –d /export/home/test1 -m test1
#cd /var/yp
#/usr/ccs/bin/make passwd
This command will add the user to the NIS database, and it pushes the database to
all slave servers.
Deleting an NIS User
Here's how to delete an NIS user:
For example:
#userdel –r test1
#cd /var/yp
#/usr/ccs/bin/make passwd
Changing a User Password
Here's how a user can change his or her password.
Log in as an NIS user to a client machine, and use this command:
#passwd –r test1
Provide the current password. The new password must differ by a minimum of
three characters from the old one and must be alphanumeric.
-.-.-.-.-.-.-.-.-.-
Configuring NIS Client System:-
Login as root:
1- Define NIS domainname (test.test is domain name)
#domainname test.test
2- Populate the /etc/defaultdomain file with the domainname.
#domainname > /etc/defaultdomain
3- Configure the NIS configuration file:
#cp /etc/nsswitch.nis /etc/nsswitch.conf
4- Edit the /etc/hosts file to ensure that the NIS master and all NIS slave servers have
been defined and that a fully qualified name exists for this server
#Vi /etc/hosts
5- Edit /etc/auto_master
#Master map for automounter
#
+auto_master
#/net -hosts -nosuid,nobrowse
/export/home auto.home -nobrowse
#/xfn -xfn -nobrowse
--------------EOF-----------------
6- Initialize the Server:
#cd /var/yp
#/usr/sbin/ypinit -c
Out put will be look like this:-
7. Start the YP service:
#/usr/lib/netsvc/yp/ypstart
8. Check the NIS database:
#ypwhich -m
Congratulations, You done!
To-do:
-- ? When client want to login at local authentication, go to single user mode by typing b
–s and provide local root password to login,
Here remove /etc/defaultdomain file to remove NIS authentication.
-- ? Unconfiguring NIS on Master/Slave Server and Client
Stop the NIS service:
# /usr/lib/netsvc/yp/ypstop
# rm /etc/defaultdomain
# cd /var/yp
# pwd
/var/yp
# vi aliases (remove any uncommented entries)
The resulting file should look something like this:
# Aliases file- database of full length and truncated length domain
and
#ident "@(#)aliases 1.2 92/07/14 SMI"
#map names. Accessed by YP commands.
# rm -r domainname (if this directory exists)
# rm -r *.time (if any of these files exists)
# cd /var/yp/binding
# pwd
/var/yp/binding
# rm -r *
# cp /etc/nsswitch.files /etc/nsswitch.conf
Reboot the server.
-- ? Prevent unauthorized domain joining:
edit files
#vi /etc/hosts.allow
#vi /etc/hosts.deny
References:
http://www.sun.com/bigadmin/content/...figure_nis.jsp
http://www.penoycentral.net/linuxnix...ectory-in-nis-
using-solaris-10/
http://gurkulindia.com/category/sola...eshooting/nis/



www.kashifaziz.co.cc kashif_khb@yahoo.com 0092-3009112223
Posted in Uncategorized
Views 961 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 12:58 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration