Help setting up NIS - BSD

This is a discussion on Help setting up NIS - BSD ; I've decided to rip NIS away from a Solaris 7 box and use a FreeBSD server to serve NIS. I'm not sure if I'm doing it the right way, but I'm trying to set up the BSD box as a ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Help setting up NIS

  1. Help setting up NIS

    I've decided to rip NIS away from a Solaris 7 box and use a FreeBSD
    server to serve NIS.

    I'm not sure if I'm doing it the right way, but I'm trying to set up
    the BSD box as a slave NIS server first to transfer all the data, then
    once it's transferred, just tell it it's a master, and take a crowbar
    to the Solaris box.

    However, when configuring the FreeBSD box as a slave, running 'ypinit -
    s ' ran _almost_ without error. When
    transferring the NIS maps, all were successfully transferred except
    these below. Are these errors the fault of the Solaris box (current
    NIS master)?

    ---
    Transfering master.passwd.byname...
    ypxfr: failed to find master of master.passwd.byname in domain cms:
    No
    such map in server's domain
    ypxfr: Exiting: Could not get master server address
    Transfering master.passwd.byuid...
    ypxfr: failed to find master of master.passwd.byuid in domain cms: No
    such map in server's domain
    ypxfr: Exiting: Could not get master server address
    Transfering rpc.byname...
    ypxfr: failed to find master of rpc.byname in domain cms: No such map
    in
    server's domain
    ypxfr: Exiting: Could not get master server address
    Transfering amd.host...
    ypxfr: failed to find master of amd.host in domain cms: No such map
    in
    server's domain
    ypxfr: Exiting: Could not get master server address
    ---

    I *think* NIS is set up in a fowl way on the Solaris box. For
    instance: '/var/yp/Makefile' specifies "DIR=/NIS" and "PWDIR=/NIS".
    Does this mean all NIS maps live in /NIS now? I ask this because,
    although there are map files in /NIS, the files below still reside in /
    var/yp (along with some confusing 0 byte map files from 2002 which I
    presume should have been deleted).

    ---
    -rw------- 1 root root 2184 Feb 7 01:45 yp_maplock
    drwxr-xr-x 4 bin bin 1024 Feb 7 01:14 ./
    -rw-r--r-- 1 root other 180 Feb 7 01:14 aliases
    drwxr-xr-x 2 root other 2048 Feb 7 01:00 cms/
    -rw-r--r-- 1 root other 0 Feb 7 01:00 netid.time
    -rw-r--r-- 1 root other 163 Feb 7 01:00 nul
    -rw-r--r-- 1 root other 0 Feb 7 01:00 hosts.time
    -rw-r--r-- 1 root other 0 Feb 7 01:00 passwd.time
    drwxr-xr-x 3 bin bin 512 Feb 6 19:24 binding/
    -rw-r--r-- 1 root other 0 Oct 12 11:49 group.time
    -rw-r--r-- 1 root other 0 Oct 3 16:23 netgroup.time
    ---

    Incidentally, 'cd /var/yp && make' only updates passwd. Shouldn't it
    update everything?

    ---
    rainbow# cd /var/yp
    rainbow# make
    make[1]: Entering directory `/var/yp'
    updated passwd
    pushed passwd
    make[1]: Leaving directory `/var/yp'
    ---

    So, armed with all this information - are any of your Unix experts
    able to throw any suggestions my way?

    Cheers,
    Steve


  2. Re: Help setting up NIS

    Steve wrote:
    > I've decided to rip NIS away from a Solaris 7 box and use a FreeBSD
    > server to serve NIS.


    First of all, I have run solaris 8 once in my life, for about an hour,
    before I felt totally lost and decided it wasn't worth my time. If I
    give wrong information pertaining to solaris, please excuse me (in advance).

    > I'm not sure if I'm doing it the right way, but I'm trying to set up
    > the BSD box as a slave NIS server first to transfer all the data, then
    > once it's transferred, just tell it it's a master, and take a crowbar
    > to the Solaris box.


    Has the FreeBSD box ever synchronized with NIS successfully? From the
    messages below (details in each pertaining spot), I don't think the two
    are compatable. If it has syncronized, I would be surprised, but would
    accept the information.

    > However, when configuring the FreeBSD box as a slave, running 'ypinit -
    > s ' ran _almost_ without error. When
    > transferring the NIS maps, all were successfully transferred except
    > these below. Are these errors the fault of the Solaris box (current
    > NIS master)?
    >
    > ---
    > Transfering master.passwd.byname...
    > ypxfr: failed to find master of master.passwd.byname in domain cms:
    > No
    > such map in server's domain
    > ypxfr: Exiting: Could not get master server address
    > Transfering master.passwd.byuid...
    > ypxfr: failed to find master of master.passwd.byuid in domain cms: No
    > such map in server's domain
    > ypxfr: Exiting: Could not get master server address
    > Transfering rpc.byname...
    > ypxfr: failed to find master of rpc.byname in domain cms: No such map
    > in
    > server's domain
    > ypxfr: Exiting: Could not get master server address
    > Transfering amd.host...
    > ypxfr: failed to find master of amd.host in domain cms: No such map
    > in
    > server's domain
    > ypxfr: Exiting: Could not get master server address
    > ---


    master.passwd.byname, master.passwd.byuid: FreeBSD's method of the real
    user password database. one is indexed by user name, one is indexed by
    id. Neither was found on the solaris yp server.

    rpc.byname: I would assume this has something to do with translating rpc
    calls to the services they are. such as NFS server.

    amd.host: Automounter Daemon (my guess). I don't know what the 'host'
    part of the name would relate to, but all of these files it couldn't
    transfer does seem to be different from how a solaris box would present
    the same data.

    > I *think* NIS is set up in a fowl way on the Solaris box. For
    > instance: '/var/yp/Makefile' specifies "DIR=/NIS" and "PWDIR=/NIS".
    > Does this mean all NIS maps live in /NIS now? I ask this because,
    > although there are map files in /NIS, the files below still reside in /
    > var/yp (along with some confusing 0 byte map files from 2002 which I
    > presume should have been deleted).


    No, I bet it's just solaris implements YP. Solaris isn't known as
    a real traditional unix-based system. Solaris has similiarities, but
    they're so far off in practice, I don't know anyone that would consider
    solaris a 'unix-based' OS.

    Since Solaris and FreeBSD do things differently, I'm not even going to
    try to dissect and find out why solaris does what it does. I just leave
    it alone.

    > ---
    > -rw------- 1 root root 2184 Feb 7 01:45 yp_maplock
    > drwxr-xr-x 4 bin bin 1024 Feb 7 01:14 ./
    > -rw-r--r-- 1 root other 180 Feb 7 01:14 aliases
    > drwxr-xr-x 2 root other 2048 Feb 7 01:00 cms/
    > -rw-r--r-- 1 root other 0 Feb 7 01:00 netid.time
    > -rw-r--r-- 1 root other 163 Feb 7 01:00 nul
    > -rw-r--r-- 1 root other 0 Feb 7 01:00 hosts.time
    > -rw-r--r-- 1 root other 0 Feb 7 01:00 passwd.time
    > drwxr-xr-x 3 bin bin 512 Feb 6 19:24 binding/
    > -rw-r--r-- 1 root other 0 Oct 12 11:49 group.time
    > -rw-r--r-- 1 root other 0 Oct 3 16:23 netgroup.time
    > ---


    I see similarities in these files that FreeBSD is looking for, but none
    of the 'important' ones FreeBSD was asking for don't exist.

    > Incidentally, 'cd /var/yp && make' only updates passwd. Shouldn't it
    > update everything?
    >
    > ---
    > rainbow# cd /var/yp
    > rainbow# make
    > make[1]: Entering directory `/var/yp'
    > updated passwd
    > pushed passwd
    > make[1]: Leaving directory `/var/yp'
    > ---


    At least on the FreeBSD and OpenBSD boxes I've done YP on, the only
    things that are 'updated' are ones that change. No changes, no
    modification, no rebuilding. Solaris may be the same, may be different.

    > So, armed with all this information - are any of your Unix experts
    > able to throw any suggestions my way?
    >
    > Cheers,
    > Steve
    >


    Overall, since solaris may not store the hashes of passwords the same
    way FreeBSD does (IIRC, MD5 is default in FreeBSD), and a move of this
    magnitude may require some converter or data translation to go between
    the two.

    I think it's a good move to move to a more mainstream OS, and FreeBSD
    will treat you right. It's not going to be very easy, from the looks of it.

    What are all the options that you would entertain, and consider...

    1) Find (or hand-make) a converter or translator.
    2) Possibly find a user-account exporting utility in solaris, to import
    data in FreeBSD.
    3) Find the hashing algorithm used by solaris 7 and adapt FreeBSD (if
    possible) to use that same algorithm, then copying the password files
    and re-creating the passwd database?
    4) Blowing it all away, starting anew, and making the optimized YP
    server design that you want?
    5) Others? More options? Would a beer help?

    3 would probably be the quickest to find, hardest to implement. 2 would
    be medium ground, 1 would be a poor decision, and you're probably
    laughing at 4.

    I would like to hear the outcome, not only for my knowledge, but also so
    other people who google search, they can maybe find a resolution.

+ Reply to Thread