*BSD News Article 49327


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!gatech!news.sprintlink.net!in2.uu.net!tcsi.tcs.com!agate!agate!usenet
From: Hubert Feyrer <Hubert.Feyrer@rz.uni-regensburg.de>
Newsgroups: comp.unix.bsd.netbsd.announce
Subject: YP (NIS) server package available
Followup-To: poster
Date: 23 Aug 1995 20:39:35 -0700
Organization: University of California, Berkeley
Lines: 103
Sender: cgd@agate.berkeley.edu
Approved: netbsd-announce-request@agate.berkeley.edu
Message-ID: <9508201927.ZM6797@rrzc1a>
NNTP-Posting-Host: agate.berkeley.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Face: iT2VNvH@a.&tC|E|:zwsgA^NC@o4gqqj3M3b-R4~1zpZ4y%@B@ZfP,7=U"{2^xd%"5iGa-*  ss+;}8PfLd?Fx[>$>E^GO:Xb"N!k`8&f1;UPdEl;\:1'stGP/I<Nl"57:V#{!4lIp8|Ooh^4g_\)QH  tEp[mk} 
X-Mailer: Z-Mail (3.2.1 15feb95)

Hi,

i've uploaded the YP (NIS) server package i've re-ported to NetBSD into
ftp.uni-regensburg.de's /pub/NetBSD-Amiga/experimental. Please note that the
binaries are compiled for NetBSD/amiga V1.0, but the source should work for
other platforms and -current, too. (I have only checked out i386 & 1.0, which
worked fine.

Here's the original README:


               Network Information Service server package
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This file describes mainly the installation of the package ypsrv-bin10.tar.gz,
which enables your machine to run as NIS (YP) server.

The code has been taken from Linux' NYS package written by Peter Eriksson
(<pen@signum.se> or <pen@lysator.liu.se>) and modified to run with
NetBSD. Note that this is right now in an experimental state as the Linux
code is based on Theo de Raadt's code which was written for NetBSD but I
couldn't get hold of Theo yet; i just needed a NIS-server *now* :-).


Installation:
~~~~~~~~~~~~~
1. Unpacking:
   # cd /
   # tar plzvxf ypsrv.tar.gz
   # usr/local/yppasswd-0.5/install/install.sh
   # usr/local/ypserv-0.13.1/install/install.sh

2. Create /var/yp/passwd:
   This file is the equivalent of /etc/passwd with passwords stored in
   there, so e.g. take your /etc/passwd and merge in the passwords from
   /etc/master.passwd.

   If you have perl5, you can do it this way (run as root!!!):
   perl5 -e 'while(@x=getpwent){ print join(":",(@x)[0,1,2,3,6,7,8]),"\n"; }' \
	>/var/yp/passwd

   Again, be sure to know what you do with this step. If you don't like
   anyone to read your users' passwords, don't use NIS! (Or port/write
   some NIS+ client/server >:)

3. Create NIS-maps from your local files:
   # cd /var/yp
   # make

4. Modify your /etc/rc.local (or whatever) to start the server-daemons
   on system-startup. Add the following lines:

   ## NIS Server
   if [ -f /var/yp/Makefile ]; then
           if [ -f /usr/local/ypserv-0.13.1/bin/ypserv ]; then
                   echo -n ' ypserv'
                   /usr/local/ypserv-0.13.1/bin/ypserv
           fi
           if [ -f /usr/local/yppasswd-0.5/bin/rpc.yppasswdd ]; then
                   echo -n ' rpc.yppasswdd'
                   /usr/local/yppasswd-0.5/bin/rpc.yppasswdd
           fi
   fi

5. Set up NIS-clients

   The following steps need to be performed on any machine that wants to
   use the Network Information Service, which will usually include the
   NIS server. If your NIS-clients run any operating system other than
   NetBSD, please consult your documentation on how to set up NIS there.

   On any NIS-client running NetBSD, do the following steps:

   1. Create a file /etc/defaultdomain which contains the name of your
      NIS-domain (which has *nothing* to do with your DNS-domain which
      you enter in /etc/resolv.conf!).

   2. # mkdir /var/yp

   3. Add the following line to your /etc/*passwd (using vipw!!!):
      +:*:-1:-1::0:0:,,,::

6. Reboot server & clients

7. Test:
   * 'ypwhich' should tell you the name of your NIS-server
   * 'ypcat passwd' should show you your server's /var/yp/passwd
   * Try logging in as a NIS-user or finger'ing one
   * Try changing a NIS-users' password, full-name or shell with
     yppasswd, ypchfn or ypchsh. Please give the NIS-server a fe
     seconds to rebuilt its databases before checking!


Have fun,

	Hubert

-- 
=============== Hubert Feyrer ============================================
      Weekdays: Rennerstr. 19, D-93053 Regensburg, Tel. 0941/943-2455
      Weekends: Bachstr. 40,   D-84066 Mallersdorf, Tel. 08772/6084
      Internet: hubert.feyrer@rz.uni-regensburg.de, IRC: hubertf
==========================================================================