Solaris Troubleshooting NIS : Upgrading the OS on an NIS Master

The one of the usual way to do this is to backup all the tables and do a fresh os install.

Steps:

1.  Backup all the target files (e.g passwd, hosts, aliases, etc ..).   You can also do the following command if the maps are not current:

# makedbm -u passwd > /tmp/passwd

# makdbm -u hosts > /tmp/hosts and so on to dump all the tables.

 2.  Reinstall the OS.

 3.  Now restore all the files (maps) in the directory of your choice (/var/ypfiles is usually used).

 4.  First, initialize the NIS Makefile:

# cp /usr/lib/NIS.Makefile /var/yp/Makefile

Have the makefile DIR and PWDIR variable point to the correct directory for the target files.

DIR = /etc  –>  should point to the location of all NIS files except passwd/shadow, in this case it is /var/yp for this example

PWDIR = /etc   –>  this should point to the passwd/shadow file

DOM = `domainname`à  Usually /var/yp is used

NOPUSH = “”

ALIASES = /etc/mail/aliases

YPDIR=/usr/lib/netsvc/yp

SBINDIR=/usr/sbin

YPDBDIR=/var/yp

YPPUSH=$(YPDIR)/yppush

MAKEDBM=$(SBINDIR)/makedbm

MULTI=$(YPDIR)/multi

REVNETGROUP=$(SBINDIR)/revnetgroup

STDETHERS=$(YPDIR)/stdethers

STDHOSTS=$(YPDIR)/stdhosts

MKNETID=$(SBINDIR)/mknetid

MKALIAS=$(YPDIR)/mkalias

 5.  Afterwards, you will want to set your nis-domain. In the example below, simply replace ‘example-name’ with the name that you have chosen for your nis-domain. Note that this nis-domain name does not have to have any relationship to your DNS domain name  it should simply be a name which is set identically on all your NIS machines. It is actually more secure to use a nis-domain-name that is totally unrelated to your DNS domain.

 # domainname example-name

# domainname > /etc/defaultdomain

 If you are planning on using DNS with NIS, you will need to change the /var/yp/Makefile to reflect this. Near the top of the Makefile, you will find the following lines:

 # Set the following variable to “-b” to have NIS servers use the domain name

# resolver for hosts not in the current domain.

#B=-b

B=

In order for DNS to work with NIS, you must change the last two lines,

as follows:

B=-b

#B=

Finally, you can initialize NIS by running the ypinit script. When ypinit queries you for server names, make sure you include all slave servers that you are planning to set up in the near future:

# cd /var/yp

# /usr/etc/yp/ypinit -m

If you wish to immediately start NIS, you can simply start the NIS daemons on your server:

# ypserv

# ypbind

# ypxfrd

 

Afterwards, make sure that ypserv, ypbind and ypxfrd are all in your /etc/rc.local file and not commented out. Whenever you reboot your machine at this point, NIS should Starte automatically

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

1 Response

  1. September 16, 2015

    […] Read – Upgrading the OS on an NIS Master […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us