Re: Migrating NIS master from DEC to AIX 5.3



On Mar 25, 8:34 pm, MJB <helios...@xxxxxxx> wrote:
We currently have a DEC running OSF1 V4.0F acting as our NIS master
with two AIX 5.3 slaves. We are going to be migrating to a new AIX
5.3 master as well. How is it best to do this? Should I first make
the future AIX master a slave of the DEC to get the maps migrated and
then kill the DEC and promote the AIX to master? Should I just make
the new AIX a master right off - but then how do I get the maps to it?

I plan on using SMIT to setup the new master and have gone into 'smit
mkmaster'. I see that it will start the required services but do not
see anything regarding maps. I've also gone into 'smit mkmaps' but it
just asks what maps to build. I assume it means new maps not existing
maps.

Obviously my NIS experience is limited so any advice would be greatly
appreciated.

all IMHO

Decision:
The /etc/passwd and /etc/group will NOT be used for NIS instead we
will use only files within the /var/yp directory. This means that we
have to create a valid passwd and group file in that directory.

Configure an AIX hosts as a NIS master

A) Preconfiguration
1 ) Patch /var/yp/Makefile so DIR points to /var/yp
vi /var/yp/Makefile

2 )
copy hosts, passwd and group into this directory

$ cp /etc/hosts /etc/passwd /etc/group /var/yp/.

and remove not needed entries.
In case you have a valid NIS environment you can get the data from
ypcat.

$ ypcat passwd > /var/yp/passwd
$ ypcat group > /var/yp/group
$ ypcat hosts > /var/yp/hosts
$ ypcat .... > /var/yp/...

3)
Patch /etc/rc.nfs so ypwasswd uses the /var/yp/passwd
So the yppasswd entry should look like.
....
#yppasswd daemon.
->>> DIR=/var/yp
if [ -x /usr/lib/netsvc/yp/rpc.yppasswdd -a -f $DIR/passwd ]; then
->>> start rpc.yppasswdd /usr/lib/netsvc/yp/rpc.yppasswdd /var/
yp/passwd -m
fi
....

4)
Change src entry:

$ chssys -s yppasswdd -a '/var/yp/passwd -m passwd'


B) Make the node the NIS master
1) Configure NIS Domain
/usr/sbin/chypdom '-B' My.nis.domain

2) Start NIS master - See "man mkmaster" for details or use smitty
$ mkmaster

In case user should be able to logon to the NIS master do the
following

# Make the host a nis client so user can log in
/usr/sbin/mkclient '-B'
# Make host a nis slave
/usr/sbin/mkslave '-O' '-B' '-c' localhost


Now the node is a NIS master
4) Test
$ ypwhich # Should point to your local NIS master
$ ypcat passwd # Should display your passwd file.

In case you encounter problems please read
http://www-1.ibm.com/support/docview.wss?uid=isg3T1000329
and follow the step: Binding the master server

After that issuse:
$ rmnfs -N # Stops NFS and NIS
$ mknfs -N # Starts NFS and NIS

5) Maintain NIS
change the appropiate NIS map ( like /var/yp/hosts , /var/yp/passwd )
with an editor of your choice and run a
# cd /var/yp && make && cd -


The advantage with this configuration type is that ALL file are not
related to any local system file. Thus you can easily move your NIS
configuration and apply updates to it.
But this means of cource that you have to maintain the NIS maps
seperatly and you can not use the AIX tools for creating users, groups
a.s.o

IBM Documentation:
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.nisplus/doc/nisplus/adm_intro.htm

hth
Hajo
.



Relevant Pages

  • Migrating NIS master from DEC to AIX 5.3
    ... We currently have a DEC running OSF1 V4.0F acting as our NIS master ... We are going to be migrating to a new AIX ... the new AIX a master right off - but then how do I get the maps to it? ...
    (comp.unix.aix)
  • Help setting up NIS
    ... I've decided to rip NIS away from a Solaris 7 box and use a FreeBSD ... server to serve NIS. ... NIS master)? ... ypxfr: failed to find master of master.passwd.byuid in domain cms: No ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Transfer NIS Master
    ... You need to tar up the directory your NIS flat files live in (I keep mine ... want to be the new master (assuming you aren't running right out of /etc, ... ypinit -m on the new server and follow up with a ypinit -s on any slaves ...
    (comp.sys.sgi.admin)
  • NIS client problems
    ... I am attemting to convert two Tru64 Unix v5.1A to be NIS clients account ... The master and slave servers are two Red Hat 7.3 Linux ... but I cannot seem to login using the password configured on the NIS ...
    (Tru64-UNIX-Managers)
  • NIS maps
    ... i am trying to create a NIS domain contatining a master and 5 clients. ... users on the master server, but this users are not getting into NIS maps. ... update NIS maps ...
    (freebsd-questions)