1999-05-07 14:05:28 +00:00
|
|
|
--- NIS-HOWTO.sgml.orig Thu May 6 23:21:26 1999
|
|
|
|
+++ NIS-HOWTO.sgml Fri May 7 22:46:26 1999
|
1998-12-30 04:42:36 +00:00
|
|
|
@@ -1,21 +1,20 @@
|
|
|
|
<!doctype linuxdoc system>
|
|
|
|
|
|
|
|
-<!-- This is the Linux NIS-HOWTO. It describes how to install and configure
|
|
|
|
- Linux as NIS client and server and as NIS+ client.
|
|
|
|
+<!-- This is the FreeBSD NIS-HOWTO. It describes how to install and configure
|
|
|
|
+ FreeBSD as NIS client and server.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<article>
|
|
|
|
|
|
|
|
-<title>The Linux NIS(YP)/NYS/NIS+ HOWTO
|
|
|
|
-<author>Thorsten Kukuk
|
|
|
|
+<title>The FreeBSD NIS(YP) HOWTO
|
|
|
|
+<author>Linux version by Thorsten Kukuk
|
1999-05-07 14:05:28 +00:00
|
|
|
<date>v1.0, 9 March 1999
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
<abstract>
|
|
|
|
<nidx>HOWTOs!NIS</nidx>
|
|
|
|
<nidx>HOWTOs!YP</nidx>
|
|
|
|
-<nidx>HOWTOs!NYS</nidx>
|
|
|
|
<nidx>HOWTOs!NIS+</nidx>
|
|
|
|
-This document describes how to configure Linux as NIS(YP) or NIS+ client
|
|
|
|
+This document describes how to configure FreeBSD as a NIS(YP) client
|
|
|
|
and how to install as NIS server.
|
|
|
|
</abstract>
|
|
|
|
|
|
|
|
@@ -25,18 +24,17 @@
|
|
|
|
<sect>Introduction
|
|
|
|
|
|
|
|
<p>
|
|
|
|
-More and more, Linux machines are installed as part of a network of
|
|
|
|
+More and more, FreeBSD machines are installed as part of a network of
|
|
|
|
computers. To simplify network administration, most networks (mostly
|
|
|
|
-Sun-based networks) run the Network Information Service. Linux machines
|
|
|
|
+Sun-based networks) run the Network Information Service. FreeBSD machines
|
|
|
|
can take full advantage of existing NIS service or provide NIS service
|
|
|
|
-themselves. Linux machines can also act as full NIS+ clients, this
|
|
|
|
-support is in beta stage.
|
|
|
|
+themselves.
|
|
|
|
|
|
|
|
-This document tries to answer questions about setting up NIS(YP) and NIS+
|
1999-05-07 14:05:28 +00:00
|
|
|
-on your Linux machine. Don't forget to read the section
|
1998-12-30 04:42:36 +00:00
|
|
|
+This document tries to answer questions about setting up NIS(YP)
|
1999-05-07 14:05:28 +00:00
|
|
|
+on your FreeBSD machine. Don't forget to read the section
|
|
|
|
<ref id="portmapper" name="The RPC Portmapper">.
|
1998-12-30 04:42:36 +00:00
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
-The NIS-Howto is edited and maintained by
|
|
|
|
+The Linux version of the NIS-Howto is edited and maintained by
|
1998-12-30 04:42:36 +00:00
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
<tscreen><verb>
|
|
|
|
Thorsten Kukuk, <kukuk@suse.de>
|
|
|
|
@@ -61,10 +59,7 @@
|
|
|
|
URL <url url="http://www.suse.de/~kukuk/linux/HOWTO/NIS-HOWTO.html"
|
|
|
|
name="http://www.suse.de/~kukuk/linux/HOWTO/NIS-HOWTO.html">.
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
-New versions of this document will also be uploaded to various
|
|
|
|
-Linux WWW and FTP sites, including the LDP home page.
|
|
|
|
-
|
|
|
|
-Links to translations of this document could be found at
|
|
|
|
+Links to translations of the Linux document can be found at
|
1999-05-07 14:05:28 +00:00
|
|
|
<url url="http://www.suse.de/~kukuk/linux/nis-howto.html"
|
|
|
|
name="http://www.suse.de/~kukuk/linux/nis-howto.html">.
|
1998-12-30 04:42:36 +00:00
|
|
|
<sect1>Disclaimer
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -87,9 +82,9 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
document, please let me know so I can correct it in the next
|
|
|
|
version. Thanks.
|
|
|
|
|
|
|
|
-Please do <em/not/ mail me questions about special problems with your Linux
|
|
|
|
-Distribution! I don't know every Linux Distribution. But I will try to add
|
|
|
|
-every solution you send me.
|
|
|
|
+Please do <em/not/ mail Thorsten questions about special problems with FreeBSD.
|
|
|
|
+The FreeBSD changes to the Linux document were done by the FreeBSD
|
|
|
|
+Documentation Project. Please send comments to docs@freebsd.org
|
|
|
|
|
|
|
|
<sect1>Acknowledgements
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -104,25 +99,20 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
</verb></tscreen>
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
Theo de Raadt is responsible for the original yp-clients code.
|
|
|
|
-Swen Thuemmler ported the yp-clients code to Linux and also ported
|
|
|
|
-the yp-routines in libc (again based on Theo's work).
|
|
|
|
-Thorsten Kukuk has written the NIS(YP) and NIS+ routines for
|
|
|
|
-GNU libc 2.x from scratch.
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
<sect>Glossary and General Information
|
|
|
|
|
|
|
|
<sect1>Glossary of Terms
|
|
|
|
<nidx>NIS!glossary</nidx>
|
|
|
|
<nidx>YP!glossary</nidx>
|
|
|
|
-<nidx>NYS!glossary</nidx>
|
|
|
|
<nidx>NIS+!glossary</nidx>
|
|
|
|
-<nidx>glossary!NIS/NYS/YP/NIS+</nidx>
|
|
|
|
+<nidx>glossary!NIS/YP/NIS+</nidx>
|
|
|
|
<p>
|
|
|
|
In this document a lot of acronyms are used. Here are the most
|
|
|
|
important acronyms and a brief explanation:
|
|
|
|
|
|
|
|
<descrip>
|
|
|
|
-<tag/DBM/DataBase Management, a library of functions which
|
1999-05-07 14:05:28 +00:00
|
|
|
+<tag/DB/DataBase Management, a library of functions which
|
1998-12-30 04:42:36 +00:00
|
|
|
maintain key-content pairs in a data base.
|
|
|
|
|
|
|
|
<tag/DLL/Dynamically Linked Library, a library linked to an
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -138,8 +128,7 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
files between two computers.
|
|
|
|
|
|
|
|
<tag/libnsl/Name services library, a library of name service calls
|
|
|
|
- (getpwnam, getservbyname, etc...) on SVR4 Unixes. GNU libc
|
|
|
|
- uses this for the NIS (YP) and NIS+ functions.
|
|
|
|
+ (getpwnam, getservbyname, etc...) on SVR4 Unixes.
|
|
|
|
|
|
|
|
<tag/libsocket/Socket services library, a library for the socket
|
|
|
|
service calls (socket, bind, listen, etc...) on SVR4 Unixes.
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -155,12 +144,7 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
replacement for NIS with better security and better handling
|
|
|
|
of _large_ installations.
|
|
|
|
|
|
|
|
-<tag/NYS/This is the name of a project and stands for NIS+, YP and Switch
|
|
|
|
- and is managed by Peter Eriksson <peter@ifm.liu.se>. It contains
|
|
|
|
- among other things a complete reimplementation of the NIS (= YP) code
|
|
|
|
- that uses the Name Services Switch functionality of the NYS library.
|
|
|
|
-
|
|
|
|
-<tag/NSS/Name Service Switch. The /etc/nsswitch.conf file determines the order
|
|
|
|
+<tag/NSS/Name Service Switch. On Solaris, the /etc/nsswitch.conf file determines the order
|
|
|
|
of lookups performed when a certain piece of information is requested.
|
|
|
|
|
|
|
|
<tag/RPC/Remote Procedure Call. RPC routines allow C programs to
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -179,7 +163,6 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
<sect1>Some General Information
|
|
|
|
<nidx>NIS!general information</nidx>
|
|
|
|
<nidx>YP!general information</nidx>
|
|
|
|
-<nidx>NYS!general information</nidx>
|
|
|
|
<nidx>NIS+!general information</nidx>
|
|
|
|
|
|
|
|
<p>
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -199,7 +182,7 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
distributed by NIS is:
|
|
|
|
|
|
|
|
<itemize>
|
|
|
|
-<item>login names/passwords/home directories (/etc/passwd)
|
|
|
|
+<item>login names/passwords/home directories (/etc/master.passwd)
|
|
|
|
<item>group information (/etc/group)
|
|
|
|
</itemize>
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -252,10 +235,8 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
use NIS+ or have severe security needs. NIS+ is _much_ more problematic
|
|
|
|
to administer (it's pretty easy to handle on the client side, but the
|
|
|
|
server side is horrible). Another problem is that the support for NIS+
|
1999-05-07 14:05:28 +00:00
|
|
|
-under Linux is still under developement - you need the latest glibc 2.1.
|
|
|
|
-There is an unsupported port of the glibc NIS+ support for libc5 as
|
|
|
|
-dropin replacement.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
+under FreeBSD is still under developement, and is not ready for Alpha testing
|
|
|
|
+yet.
|
|
|
|
|
|
|
|
<sect>How it works
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -324,10 +305,9 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
<p>
|
|
|
|
To run any of the software mentioned below you will need to run the
|
|
|
|
-program /usr/sbin/portmap. Some Linux distributions already have
|
1999-05-07 14:05:28 +00:00
|
|
|
-the code in the /sbin/init.d/ or /etc/rc.d/ files to start up this
|
|
|
|
-daemon. All you have to do is to activate it and reboot your Linux
|
|
|
|
-machine. Read your Linux Distribution Documentation how to do this.
|
|
|
|
+program /usr/sbin/portmap. In FreeBSD you specify your desire to run the
|
1998-12-30 04:42:36 +00:00
|
|
|
+Portmapper in /etc/rc.conf.
|
|
|
|
+All you have to do is to activate it and reboot your FreeBSD machine.
|
|
|
|
|
|
|
|
The RPC portmapper (portmap(8)) is a server that converts RPC program
|
|
|
|
numbers into TCP/IP (or UDP/IP) protocol port numbers. It must be
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -374,57 +354,23 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
ypcat, yppoll, ypmatch). The most important program is ypbind. This
|
1999-05-07 14:05:28 +00:00
|
|
|
program must be running at all times, which means, it should always appear
|
|
|
|
in the list of processes. It is a daemon process and needs to
|
|
|
|
-be started from the system's startup file (eg. /etc/init.d/nis,
|
|
|
|
-/sbin/init.d/ypclient, /etc/rc.d/init.d/ypbind, /etc/rc.local).
|
1998-12-30 04:42:36 +00:00
|
|
|
+be started from the system's startup file (eg. /etc/rc.network).
|
|
|
|
+You specify your desire to run ypbind in /etc/rc.conf.
|
1999-05-07 14:05:28 +00:00
|
|
|
As soon as ypbind is running your system has become a NIS client.
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
In the second case, if you don't have NIS servers, then you will also
|
1999-05-07 14:05:28 +00:00
|
|
|
need a NIS server program (usually called ypserv). Section
|
|
|
|
<ref id="ypserv" name="Setting up a NIS Server"> describes
|
1998-12-30 04:42:36 +00:00
|
|
|
-how to set up a NIS server on your Linux machine using the "ypserv"
|
|
|
|
-implementation by Peter Eriksson and Thorsten Kukuk.
|
|
|
|
-Note that from version 0.14 this implementation supports the
|
|
|
|
-master-slave concept talked about in section 4.1.
|
|
|
|
-
|
|
|
|
-There is also another free NIS server available, called "yps", written
|
|
|
|
-by Tobias Reber in Germany which does support the master-slave concept,
|
1999-05-07 14:05:28 +00:00
|
|
|
-but has other limitations and isn't supported since a long time.
|
1998-12-30 04:42:36 +00:00
|
|
|
+how to set up a NIS server on your FreeBSD machine using "ypserv".
|
|
|
|
|
|
|
|
|
|
|
|
<sect1>The Software
|
|
|
|
<nidx>NIS!library requirements</nidx>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
-The system library "/usr/lib/libc.a" (version 4.4.2 and better) or the
|
|
|
|
-shared library "/lib/libc.so.x" contain all necessary system calls to
|
1999-05-07 14:05:28 +00:00
|
|
|
-succesfully compile the NIS client and server software. For the
|
|
|
|
-GNU C Library 2 (glibc 2.x), you also need /lib/libnsl.so.1.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-Some people reported that NIS only works with "/usr/lib/libc.a" version
|
|
|
|
-4.5.21 and better so if you want to play it safe don't use older
|
|
|
|
-libc's. The NIS client software can be obtained from:
|
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
|
|
|
- Site Directory File Name
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
- ftp.kernel.org /pub/linux/utils/net/NIS yp-tools-2.2.tar.gz
|
|
|
|
- ftp.kernel.org /pub/linux/utils/net/NIS ypbind-mt-1.4.tar.gz
|
1998-12-30 04:42:36 +00:00
|
|
|
- ftp.kernel.org /pub/linux/utils/net/NIS ypbind-3.3.tar.gz
|
1999-05-07 14:05:28 +00:00
|
|
|
- ftp.kernel.org /pub/linux/utils/net/NIS ypbind-3.3-glibc5.diff.gz
|
1998-12-30 04:42:36 +00:00
|
|
|
- ftp.uni-paderborn.de /linux/local/yp yp-clients-2.2.tar.gz
|
|
|
|
-</verb></tscreen>
|
1999-05-07 14:05:28 +00:00
|
|
|
-
|
|
|
|
-Once you obtained the software, please follow the instructions which
|
|
|
|
-come with the software. yp-clients 2.2 are for use with libc4 and libc5
|
|
|
|
-until 5.4.20. libc 5.4.21 and glibc 2.x needs yp-tools 1.4.1 or later.
|
|
|
|
-The new yp-tools 2.2 should work with every Linux libc. Since there was
|
|
|
|
-a bug in the NIS code, you shouldn't use libc 5.4.21-5.4.35. Use libc
|
|
|
|
-5.4.36 or later instead, or the most YP programs will not work.
|
|
|
|
-ypbind 3.3 will work with all libraries, too. If you use gcc 2.8.x or
|
|
|
|
-greater, egcs or glibc 2.x, you should add the ypbind-3.3-glibc5.diff
|
|
|
|
-patch to ypbind 3.3. Please never use the ypbind from yp-clients 2.2.
|
|
|
|
-ypbind-mt is a new, multithreaded daemon. It needs a Linux 2.2 kernel,
|
|
|
|
-and glibc 2.1 or later.
|
1998-12-30 04:42:36 +00:00
|
|
|
+The system libraries "/usr/lib/libc.so.x" and "/usr/lib/libc.a"
|
|
|
|
+contain all necessary system calls to
|
|
|
|
+succesfully compile the NIS client and server software.
|
|
|
|
|
|
|
|
<sect1>The ypbind daemon
|
|
|
|
<nidx>NIS!ypbind daemon</nidx>
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -432,25 +378,9 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
<nidx>daemon!ypbind</nidx>
|
|
|
|
|
|
|
|
<p>
|
1999-05-07 14:05:28 +00:00
|
|
|
-After you have succesfully compiled the software you are now ready
|
|
|
|
-to install it. A suitable place for the ypbind daemon is the directory
|
|
|
|
-/usr/sbin. Some people may tell you that you don't need
|
|
|
|
-ypbind on a system with NYS. This is wrong. ypwhich and ypcat need it
|
|
|
|
-always.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-You must do this as root of course. The other binaries (ypwhich,
|
|
|
|
-ypcat, yppasswd, yppoll, ypmatch) should go in a directory accessible
|
|
|
|
-by all users, normally /usr/bin.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-Newer ypbind versions have a configuration file called /etc/yp.conf. You can
|
1998-12-30 04:42:36 +00:00
|
|
|
-hardcode a NIS server there - for more info see the manual page for ypbind(8).
|
|
|
|
-You also need this file for NYS.
|
|
|
|
-An example:
|
|
|
|
-<tscreen><verb>
|
|
|
|
- ypserver voyager
|
1999-05-07 14:05:28 +00:00
|
|
|
- ypserver defiant
|
1998-12-30 04:42:36 +00:00
|
|
|
- ypserver ds9
|
|
|
|
-</verb></tscreen>
|
|
|
|
+The ypbind process can be forced to bind to a specific NIS server by specifing
|
|
|
|
+the server in /etc/rc.conf.
|
|
|
|
+For more info see the manual page for ypbind(8).
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
If the system cam resolv the hostnames without NIS, you may use
|
|
|
|
the name, otherwise you have to use the IP address. ypbind 3.3 has a bug
|
|
|
|
@@ -539,11 +469,6 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
This directory MUST exist for ypbind to start up succesfully.
|
|
|
|
|
|
|
|
-To check if the domainname is set correct, use the /bin/ypdomainname from
|
1999-05-07 14:05:28 +00:00
|
|
|
-yp-tools 2.2. It uses the yp_get_default_domain() function which is more
|
1998-12-30 04:42:36 +00:00
|
|
|
-restrict. It doesn't allow for example the "(none)" domainname, which
|
|
|
|
-is the default under Linux and makes a lot of problems.
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
If the test worked you may now want to change your startupd files
|
|
|
|
so that ypbind will be started at boot time and your system will
|
|
|
|
act as a NIS client. Make sure that the domainname will
|
|
|
|
@@ -558,20 +483,20 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
<p>
|
|
|
|
For host lookups you must set (or add) "nis" to the lookup order line
|
|
|
|
-in your /etc/host.conf file. Please read the manpage "resolv+.8" for
|
|
|
|
+in your /etc/host.conf file. Please see the comments in /etc/host.conf
|
|
|
|
more details.
|
|
|
|
|
|
|
|
-Add the following line to /etc/passwd on your NIS clients:
|
|
|
|
+Add the following line to /etc/master.passwd using vipw on your NIS clients:
|
|
|
|
|
|
|
|
<tscreen><verb>
|
|
|
|
-+::::::
|
|
|
|
++:::::::::
|
|
|
|
</verb></tscreen>
|
|
|
|
|
|
|
|
You can also use the + and - characters to include/exclude or change
|
|
|
|
users. If you want to exclude the user guest just add -guest to your
|
|
|
|
-/etc/passwd file. You want to use a different shell (e.g. ksh) for
|
|
|
|
-the user "linux"? No problem, just add "+linux::::::/bin/ksh"
|
|
|
|
-(without the quotes) to your /etc/passwd. Fields that you don't want
|
|
|
|
+/etc/master.passwd file. You want to use a different shell (e.g. sh) for
|
|
|
|
+the user "ken"? No problem, just add "+ken:::::::::/usr/local/bin/bash"
|
|
|
|
+(without the quotes) to your /etc/master.passwd using vipw. Fields that you don't want
|
|
|
|
to change have to be left empty. You could also use Netgroups for
|
|
|
|
user control.
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -580,376 +505,22 @@
|
|
|
|
of all other users available use:
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
<tscreen><verb>
|
|
|
|
- +miquels:::::::
|
|
|
|
- +ed:::::::
|
|
|
|
- +dth:::::::
|
|
|
|
- +@sysadmins:::::::
|
|
|
|
- -ftp
|
|
|
|
- +:*::::::/etc/NoShell
|
|
|
|
+ +dennis:::::::::
|
|
|
|
+ +@sysadmins:::::::::
|
|
|
|
+ -ftp:::::::::
|
|
|
|
+ +@rejected-users::32767:32767::::::/bin/false
|
|
|
|
</verb></tscreen>
|
|
|
|
|
|
|
|
-Note that in Linux you can also override the password field, as we did
|
|
|
|
+Note that in FreeBSD you can also override the password field, as we did
|
1999-05-07 14:05:28 +00:00
|
|
|
in this example. We also remove the login "ftp", so it isn't known any
|
|
|
|
longer, and anonymous ftp will not work.
|
1998-12-30 04:42:36 +00:00
|
|
|
+See the ``man 5 passwd'' for further explantion and more examples.
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
The netgroup would look like
|
1998-12-30 04:42:36 +00:00
|
|
|
<tscreen><verb>
|
|
|
|
sysadmins (-,software,) (-,kukuk,)
|
|
|
|
</verb></tscreen>
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
-IMPORTANT: The netgroup feature is implemented starting from libc 4.5.26.
|
|
|
|
-If you have a version of libc earlier than 4.5.26, every user in the
|
|
|
|
-NIS password database can access your linux machine if you run "ypbind" !
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-
|
|
|
|
-<sect1>Setting up a NIS Client using NYS
|
|
|
|
-<nidx>NYS!client setup</nidx>
|
|
|
|
-
|
|
|
|
-<p>
|
|
|
|
-All that is required is that the NIS configuration file
|
|
|
|
-(/etc/yp.conf) points to the correct server(s) for its information.
|
|
|
|
-Also, the Name Services Switch configuration file (/etc/nsswitch.conf)
|
|
|
|
-must be correctly set up.
|
|
|
|
-
|
|
|
|
-You should install ypbind. It isn't needed by the libc, but the NIS(YP)
|
|
|
|
-tools need it.
|
|
|
|
-
|
|
|
|
-If you wish to use the include/exclude user feature (+/-guest/+@admins),
|
1999-05-07 14:05:28 +00:00
|
|
|
-you have to use "passwd: compat" and "group: compat" in nsswitch.conf.
|
|
|
|
-Note that there is no "shadow: compat"! You have to
|
|
|
|
-use "shadow: files nis" in this case.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-The NYS sources are part of the libc 5 sources. When run configure,
|
|
|
|
-say the first time "NO" to the "Values correct" question,
|
|
|
|
-then say "YES" to "Build a NYS libc from nys".
|
|
|
|
-
|
|
|
|
-<sect1>Setting up a NIS Client using glibc 2.x
|
|
|
|
-<nidx>NIS!client setup!using glibc 2.x</nidx>
|
|
|
|
-
|
|
|
|
-<p>
|
|
|
|
-The glibc uses "traditional NIS", so you need to start ypbind. The
|
|
|
|
-Name Services Switch configuration file (/etc/nsswitch.conf) must be
|
|
|
|
-correctly set up. If you use the compat mode for passwd, shadow or group,
|
1999-05-07 14:05:28 +00:00
|
|
|
-you have to add the "+" at the end of this files and you can use
|
1998-12-30 04:42:36 +00:00
|
|
|
-the include/exclude user feature. The configuration is excatly the same
|
|
|
|
-as under Solaris 2.x.
|
|
|
|
-
|
|
|
|
-<sect1>The nsswitch.conf File
|
|
|
|
-<nidx>nsswitch.conf file</nidx>
|
|
|
|
-<nidx>NIS!nsswitch.conf file</nidx>
|
|
|
|
-
|
|
|
|
-<p>
|
|
|
|
-The Network Services switch file /etc/nsswitch.conf determines the
|
|
|
|
-order of lookups performed when a certain piece of information is
|
|
|
|
-requested, just like the /etc/host.conf file which determines the way
|
|
|
|
-host lookups are performed. For example, the line
|
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
|
|
|
- hosts: files nis dns
|
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
|
|
|
-specifies that host lookup functions should first look in the local
|
1999-05-07 14:05:28 +00:00
|
|
|
-/etc/hosts file, followed by a NIS lookup and finally through the domain
|
1998-12-30 04:42:36 +00:00
|
|
|
-name service (/etc/resolv.conf and named), at which point if no match
|
|
|
|
-is found an error is returned. This file must be readable for every
|
1999-05-07 14:05:28 +00:00
|
|
|
-user! You can find more information in the man-page nsswitch.5
|
|
|
|
-or nsswitch.conf.5.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-A good /etc/nsswitch.conf file for NIS is:
|
|
|
|
-<tscreen><verb>
|
|
|
|
-#
|
|
|
|
-# /etc/nsswitch.conf
|
|
|
|
-#
|
|
|
|
-# An example Name Service Switch config file. This file should be
|
|
|
|
-# sorted with the most-used services at the beginning.
|
|
|
|
-#
|
|
|
|
-# The entry '[NOTFOUND=return]' means that the search for an
|
|
|
|
-# entry should stop if the search in the previous entry turned
|
|
|
|
-# up nothing. Note that if the search failed due to some other reason
|
|
|
|
-# (like no NIS server responding) then the search continues with the
|
|
|
|
-# next entry.
|
|
|
|
-#
|
|
|
|
-# Legal entries are:
|
|
|
|
-#
|
|
|
|
-# nisplus Use NIS+ (NIS version 3)
|
|
|
|
-# nis Use NIS (NIS version 2), also called YP
|
|
|
|
-# dns Use DNS (Domain Name Service)
|
|
|
|
-# files Use the local files
|
|
|
|
-# db Use the /var/db databases
|
|
|
|
-# [NOTFOUND=return] Stop searching if not found so far
|
|
|
|
-#
|
|
|
|
-
|
|
|
|
-passwd: compat
|
|
|
|
-group: compat
|
1999-05-07 14:05:28 +00:00
|
|
|
-# For libc5, you must use shadow: files nis
|
1998-12-30 04:42:36 +00:00
|
|
|
-shadow: compat
|
|
|
|
-
|
|
|
|
-passwd_compat: nis
|
|
|
|
-group_compat: nis
|
|
|
|
-shadow_compat: nis
|
|
|
|
-
|
|
|
|
-hosts: nis files dns
|
|
|
|
-
|
|
|
|
-services: nis [NOTFOUND=return] files
|
|
|
|
-networks: nis [NOTFOUND=return] files
|
|
|
|
-protocols: nis [NOTFOUND=return] files
|
|
|
|
-rpc: nis [NOTFOUND=return] files
|
|
|
|
-ethers: nis [NOTFOUND=return] files
|
|
|
|
-netmasks: nis [NOTFOUND=return] files
|
|
|
|
-netgroup: nis
|
|
|
|
-bootparams: nis [NOTFOUND=return] files
|
|
|
|
-publickey: nis [NOTFOUND=return] files
|
|
|
|
-automount: files
|
|
|
|
-aliases: nis [NOTFOUND=return] files
|
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
|
|
|
-passwd_compat, group_compat and shadow_compat are only supported by glibc 2.x.
|
|
|
|
-If there are no shadow rules in /etc/nsswitch.conf, glibc will use the passwd
|
|
|
|
-rule for lookups. There are some more lookup module for glibc like hesoid.
|
|
|
|
-For more information, read the glibc documentation.
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-<sect1> Shadow Passwords with NIS
|
1998-12-30 04:42:36 +00:00
|
|
|
-<nidx>NIS!shadow passwords</nidx>
|
|
|
|
-<p>
|
1999-05-07 14:05:28 +00:00
|
|
|
-Shadow passwords over NIS are always a bad idea. You loose the security,
|
|
|
|
-which shadow gives you, and it is supported by only some few Linux C
|
|
|
|
-Libraries. A good way to avoid shadow passwords over NIS is,
|
1998-12-30 04:42:36 +00:00
|
|
|
-to put only the local system users in /etc/shadow. Remove the NIS user
|
|
|
|
-entries from the shadow database, and put the password back in passwd.
|
1999-05-07 14:05:28 +00:00
|
|
|
-So you can use shadow for the root login, and normal passwd for NIS
|
|
|
|
-user. This has the advantage that it will work with every NIS client.
|
|
|
|
-
|
|
|
|
-<sect2>Linux
|
|
|
|
-<p>
|
|
|
|
-The only Linux libc which supports shadow passwords over NIS, is the
|
|
|
|
-GNU C Library 2.x. Linux libc5 has no support for it. Linux
|
|
|
|
-libc5 compiled with NYS enabled has some code for it. But this code
|
|
|
|
-is badly broken in some cases and doesn't work with all correct
|
|
|
|
-shadow entries.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-<sect2>Solaris
|
|
|
|
-<p>
|
|
|
|
-Solaris does not support shadow passwords over NIS.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-<sect2>PAM
|
|
|
|
-<nidx>PAM!shadow passwords</nidx
|
|
|
|
-<p>
|
|
|
|
-PAM does not support Shadow passwords over NIS, especially
|
|
|
|
-pam_pwdb/libpwdb. This is a big problem for RedHat 5.x users. If you
|
|
|
|
-have glibc and PAM, you need to change the /etc/pam.d/* entries.
|
|
|
|
-Replace all pam_pwdb rules through pam_unix_*
|
|
|
|
-modules. Due a bug in the pam_unix_auth.so module this will not always
|
|
|
|
-work.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-An example /etc/pam.d/login file looks like:
|
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
|
|
|
-#%PAM-1.0
|
|
|
|
-auth required /lib/security/pam_securetty.so
|
|
|
|
-auth required /lib/security/pam_unix_auth.so
|
|
|
|
-auth required /lib/security/pam_nologin.so
|
|
|
|
-account required /lib/security/pam_unix_acct.so
|
|
|
|
-password required /lib/security/pam_unix_passwd.so
|
|
|
|
-session required /lib/security/pam_unix_session.so
|
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
|
|
|
-For auth you need to use the pam_unix_auth.so module, for account the
|
|
|
|
-pam_unix_acct.so, for password the pam_unix_passwd.so and for
|
|
|
|
-session the pam_unix_session.so module.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-<sect> What do you need to set up NIS+ ?
|
|
|
|
-
|
|
|
|
-<sect1>The Software
|
|
|
|
-<nidx>NIS+!software required</nidx>
|
|
|
|
-
|
|
|
|
-<p>
|
|
|
|
-The Linux NIS+ client code was developed for the GNU C library 2.
|
1999-05-07 14:05:28 +00:00
|
|
|
-There is also a port for Linux libc5, since most commercial Applications
|
|
|
|
-are linked against this library, and you cannot recompile them for
|
|
|
|
-using glibc. There are problems with libc5 and NIS+:
|
|
|
|
-static programs cannot be linked with it, and programs compiled
|
|
|
|
-with this library will
|
1998-12-30 04:42:36 +00:00
|
|
|
-not work with other libc5 versions.
|
|
|
|
-
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-You need to retrieve and compile the GNU C Library 2.1 for Intel
|
|
|
|
-based platforms, or GNU C Library 2.1.1 for 64bit platforms.
|
|
|
|
-As base System you need a glibc based Distribution like Debian 2.x,
|
|
|
|
-RedHat 5.x or SuSE Linux 6.x.
|
|
|
|
-
|
|
|
|
-For every distribution, you need to recompile the gcc/g++ compiler,
|
|
|
|
-libstdc++ and ncures. For Redhat, you need to make a lot of
|
|
|
|
-changes of the PAM configuration. For SuSE Linux 6.0, you need
|
|
|
|
-to recompile the shadow package.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-The NIS+ client software can be obtained from:
|
|
|
|
-<tscreen><verb>
|
1999-05-07 14:05:28 +00:00
|
|
|
- Site Directory File Name
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
- ftp.funet.fi /pub/gnu/funet libc-*, glibc-crypt-*,
|
|
|
|
- glibc-linuxthreads-*
|
|
|
|
- ftp.kernel.org /pub/linux/utils/net/NIS+ nis-utils-19990223.tar.gz
|
|
|
|
- ftp.kernel.org /pub/linux/utils/net/NIS+ pam_keylogin-1.2.tar.gz
|
1998-12-30 04:42:36 +00:00
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
|
|
|
-Distributions based on glibc can be fetched from:
|
|
|
|
-<tscreen><verb>
|
|
|
|
- Site Directory
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
- ftp.debian.org /pub/debian/dists/slink
|
|
|
|
- ftp.redhat.com /pub/redhat/redhat-5.2
|
|
|
|
- ftp.suse.de /pub/SuSE-Linux/6.0
|
1998-12-30 04:42:36 +00:00
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-For compilation of the GNU C Library please follow the instructions
|
|
|
|
-which come with the software. You cam find the patched libc5,
|
|
|
|
-based on NYS, and the sources as drop in replacement for the
|
|
|
|
-standart libc5 at:
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
|
|
|
- Site Directory File Name
|
|
|
|
-
|
|
|
|
- ftp.kernel.org /pub/linux/utils/net/NIS+ libc-5.4.44-nsl-0.4.10.tar.gz
|
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-You should also have a look at
|
|
|
|
- <url url="http://www.suse.de/~kukuk/linux/nisplus.html"
|
|
|
|
- name="http://www.suse.de/~kukuk/linux/nisplus.html">
|
1998-12-30 04:42:36 +00:00
|
|
|
-for more information and the latest sources.
|
|
|
|
-
|
|
|
|
-<sect1>Setting up a NIS+ client
|
|
|
|
-<nidx>NIS+!client setup</nidx>
|
|
|
|
-
|
|
|
|
-<p>
|
1999-05-07 14:05:28 +00:00
|
|
|
-IMPORTANT: For setting up a NIS+ client read your Solaris NIS+ docs
|
|
|
|
-what to do on the server side! This document only describes what to do
|
|
|
|
-on the client side!
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-After installing the new libc and nis-tools, create the credentials for
|
1999-05-07 14:05:28 +00:00
|
|
|
-the new client on the NIS+ server. Make sure portmap is running. Then
|
|
|
|
-check if your Linux PC has the same time as the NIS+ Server. For secure RPC,
|
1998-12-30 04:42:36 +00:00
|
|
|
-you have only a small window from about 3 minutes, in which the credentials
|
|
|
|
-are valid. A good idea is to run xntpd on every host. After this, run
|
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
|
|
|
-domainname nisplus.domain.
|
|
|
|
-nisinit -c -H <NIS+ server>
|
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-to initialize the cold start file. Read the nisinit man page for more
|
|
|
|
-options. Make sure that the domainname will always be set after a reboot.
|
1998-12-30 04:42:36 +00:00
|
|
|
-If you don't know what the NIS+ domain name is on your network, ask
|
|
|
|
-your system/network administrator.
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-Now you should change your /etc/nsswitch.conf file. Make sure that the
|
1998-12-30 04:42:36 +00:00
|
|
|
-only service after publickey is nisplus ("publickey: nisplus"), and nothing
|
1999-05-07 14:05:28 +00:00
|
|
|
-else!
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-Then start keyserv and make sure, that it will always be started
|
|
|
|
-as first daemon after portmap at boot time. Run
|
1998-12-30 04:42:36 +00:00
|
|
|
-<tscreen><verb>
|
|
|
|
-keylogin -r
|
|
|
|
-</verb></tscreen>
|
|
|
|
-to store the root secretkey on your system. (I hope you have added the
|
1999-05-07 14:05:28 +00:00
|
|
|
-publickey for the new host on the NIS+ Server?).
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-"niscat passwd.org_dir" should now show you all entries in the passwd database.
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-<sect1>NIS+, keylogin, login and PAM
|
|
|
|
-<nidx>NIS+!use of PAM with</nidx>
|
|
|
|
-
|
|
|
|
-<p>
|
|
|
|
-When the user logs in, he need to set his secretkey to keyserv. This is done
|
|
|
|
-by calling "keylogin". The login from the shadow package will do this for the
|
1999-05-07 14:05:28 +00:00
|
|
|
-user, if it was compiled against glibc 2.1. For a PAM aware login, you have
|
|
|
|
-to install pam_keylogin-1.2.tar.gz and change the /etc/pam.d/login file to
|
|
|
|
-use pam_unix_auth, not pwdb, which doesn't support NIS+. An example:
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
|
|
|
-#%PAM-1.0
|
|
|
|
-auth required /lib/security/pam_securetty.so
|
|
|
|
-auth required /lib/security/pam_keylogin.so
|
|
|
|
-auth required /lib/security/pam_unix_auth.so
|
|
|
|
-auth required /lib/security/pam_nologin.so
|
|
|
|
-account required /lib/security/pam_unix_acct.so
|
|
|
|
-password required /lib/security/pam_unix_passwd.so
|
|
|
|
-session required /lib/security/pam_unix_session.so
|
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-<sect1>The nsswitch.conf File
|
|
|
|
-<nidx>nsswitch.conf file</nidx>
|
|
|
|
-<nidx>NIS+!nsswitch.conf file</nidx>
|
|
|
|
-
|
|
|
|
-<p>
|
|
|
|
-The Network Services switch file /etc/nsswitch.conf determines the
|
|
|
|
-order of lookups performed when a certain piece of information is
|
|
|
|
-requested, just like the /etc/host.conf file which determines the way
|
|
|
|
-host lookups are performed. For example, the line
|
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
|
|
|
- hosts: files nisplus dns
|
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
|
|
|
-specifies that host lookup functions should first look in the local
|
1999-05-07 14:05:28 +00:00
|
|
|
-/etc/hosts file, followed by a NIS+ lookup and finally through the domain
|
1998-12-30 04:42:36 +00:00
|
|
|
-name service (/etc/resolv.conf and named), at which point if no match
|
|
|
|
-is found an error is returned.
|
|
|
|
-
|
|
|
|
-A good /etc/nsswitch.conf file for NIS+ is:
|
|
|
|
-<tscreen><verb>
|
|
|
|
-#
|
|
|
|
-# /etc/nsswitch.conf
|
|
|
|
-#
|
|
|
|
-# An example Name Service Switch config file. This file should be
|
|
|
|
-# sorted with the most-used services at the beginning.
|
|
|
|
-#
|
|
|
|
-# The entry '[NOTFOUND=return]' means that the search for an
|
|
|
|
-# entry should stop if the search in the previous entry turned
|
|
|
|
-# up nothing. Note that if the search failed due to some other reason
|
|
|
|
-# (like no NIS server responding) then the search continues with the
|
|
|
|
-# next entry.
|
|
|
|
-#
|
|
|
|
-# Legal entries are:
|
|
|
|
-#
|
|
|
|
-# nisplus Use NIS+ (NIS version 3)
|
|
|
|
-# nis Use NIS (NIS version 2), also called YP
|
|
|
|
-# dns Use DNS (Domain Name Service)
|
|
|
|
-# files Use the local files
|
|
|
|
-# db Use the /var/db databases
|
|
|
|
-# [NOTFOUND=return] Stop searching if not found so far
|
|
|
|
-#
|
|
|
|
-
|
|
|
|
-passwd: compat
|
|
|
|
-# for libc5: passwd: files nisplus
|
|
|
|
-group: compat
|
|
|
|
-# for libc5: group: files nisplus
|
|
|
|
-shadow: compat
|
|
|
|
-# for libc5: shadow: files nisplus
|
|
|
|
-
|
|
|
|
-passwd_compat: nisplus
|
|
|
|
-group_compat: nisplus
|
|
|
|
-shadow_compat: nisplus
|
|
|
|
-
|
|
|
|
-hosts: nisplus files dns
|
|
|
|
-
|
|
|
|
-services: nisplus [NOTFOUND=return] files
|
|
|
|
-networks: nisplus [NOTFOUND=return] files
|
|
|
|
-protocols: nisplus [NOTFOUND=return] files
|
|
|
|
-rpc: nisplus [NOTFOUND=return] files
|
|
|
|
-ethers: nisplus [NOTFOUND=return] files
|
|
|
|
-netmasks: nisplus [NOTFOUND=return] files
|
|
|
|
-netgroup: nisplus
|
|
|
|
-bootparams: nisplus [NOTFOUND=return] files
|
|
|
|
-publickey: nisplus
|
|
|
|
-automount: files
|
|
|
|
-aliases: nisplus [NOTFOUND=return] files
|
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-
|
|
|
|
-
|
|
|
|
<sect>Setting up a NIS Server<label id=ypserv>
|
1998-12-30 04:42:36 +00:00
|
|
|
<nidx>NIS!server setup</nidx>
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -960,28 +531,7 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
<p>
|
|
|
|
This document only describes how to set up the "ypserv" NIS server.
|
|
|
|
|
|
|
|
-The NIS server software can be found on:
|
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
1999-05-07 14:05:28 +00:00
|
|
|
- Site Directory File Name
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
- ftp.kernel.org /pub/linux/utils/net/NIS ypserv-1.3.6.tar.gz
|
1998-12-30 04:42:36 +00:00
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
|
|
|
-You could also look at
|
1999-05-07 14:05:28 +00:00
|
|
|
- <url url="http://www.suse.de/~kukuk/linux/nis.html"
|
|
|
|
- name="http://www.suse.de/~kukuk/linux/nis.html">
|
1998-12-30 04:42:36 +00:00
|
|
|
-for more information.
|
1999-05-07 14:05:28 +00:00
|
|
|
-
|
1998-12-30 04:42:36 +00:00
|
|
|
-The server setup is the same for both traditional NIS and NYS.
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-Compile the software to generate the <tt>ypserv</tt> and <tt>makedbm</tt>
|
|
|
|
-programs. You can configure ypserv to use the securenets file or
|
|
|
|
-the tcp_wrappers. The tcp_wrapper is much more flexible, but a lot of
|
|
|
|
-people have big problems with it. And some configuration files for
|
|
|
|
-tcp_wrappers may cause a memory leak. If you have problems with
|
|
|
|
-ypserv compiled for tcp_wrapper, recompile it using the securenets file.
|
|
|
|
-ypserv --version tells you, which version you have.
|
|
|
|
+The NIS server software can be found as /usr/sbin/ypserv.
|
|
|
|
|
|
|
|
If you run your server as master, determine what files you require to be
|
|
|
|
available via NIS and then add or remove the appropriate
|
|
|
|
@@ -989,16 +539,8 @@
|
|
|
|
should look at the Makefile and edit the Options at the beginning of
|
|
|
|
the file.
|
1998-12-30 04:42:36 +00:00
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
-There was one big change between ypserv 1.1 and ypserv 1.2. Since
|
|
|
|
-version 1.2, the file handles are cached. This means you have to
|
|
|
|
-call makedbm always with the -c option if you create new maps. Make
|
|
|
|
-sure, you are using the
|
1998-12-30 04:42:36 +00:00
|
|
|
-new <tt>/var/yp/Makefile</tt> from ypserv 1.2 or later, or add the -c flag
|
|
|
|
-to makedbm in the Makefile. If you don't do that, ypserv will continue to
|
1999-05-07 14:05:28 +00:00
|
|
|
-use the old maps, and not the updated one.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-Now edit <tt>/var/yp/securenets</tt> and <tt>/etc/ypserv.conf</tt>.
|
1998-12-30 04:42:36 +00:00
|
|
|
-For more information, read the ypserv(8) and ypserv.conf(5) manual pages.
|
1999-05-07 14:05:28 +00:00
|
|
|
+Now edit <tt>/var/yp/securenets</tt> and <tt>/etc/rc.conf</tt>.
|
1998-12-30 04:42:36 +00:00
|
|
|
+For more information, read the ypserv(8) manual page and /etc/rc.conf comments.
|
|
|
|
|
|
|
|
Make sure the portmapper (portmap(8)) is running, and start the
|
1999-05-07 14:05:28 +00:00
|
|
|
server <tt>ypserv</tt>. The command
|
|
|
|
@@ -1021,14 +563,14 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
Now generate the NIS (YP) database. On the master, run
|
|
|
|
|
|
|
|
<tscreen><verb>
|
|
|
|
- % /usr/lib/yp/ypinit -m
|
|
|
|
+ % /usr/sbin/ypinit -m
|
|
|
|
</verb></tscreen>
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
On a slave make sure that <tt>ypwhich -m</tt> works. This means,
|
|
|
|
that your slave
|
1998-12-30 04:42:36 +00:00
|
|
|
must be configured as NIS client before you could run
|
|
|
|
<tscreen><verb>
|
|
|
|
- % /usr/lib/yp/ypinit -s masterhost
|
|
|
|
+ % /usr/sbin/ypinit -s masterhost
|
|
|
|
</verb></tscreen>
|
|
|
|
to install the host as NIS slave.
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -1045,13 +587,13 @@
|
|
|
|
is newer, and push the files to the slave servers. Please don't use
|
|
|
|
<tt>ypinit</tt> for updating a map.
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
-You might want to edit root's crontab *on the slave* server and add the
|
|
|
|
+You might want to edit the system crontab (/etc/crontab) *on the slave* server and add the
|
|
|
|
following lines:
|
|
|
|
|
|
|
|
<tscreen><verb>
|
|
|
|
- 20 * * * * /usr/lib/yp/ypxfr_1perhour
|
|
|
|
- 40 6 * * * /usr/lib/yp/ypxfr_1perday
|
|
|
|
- 55 6,18 * * * /usr/lib/yp/ypxfr_2perday
|
|
|
|
+ 20 * * * * root /usr/libexec/ypxfr passwd.byname
|
|
|
|
+ 21 * * * * root /usr/libexec/ypxfr passwd.byuid
|
|
|
|
+ 55 19 * * * root /usr/libexec/ypxfr hosts.ypname
|
|
|
|
</verb></tscreen>
|
|
|
|
This will ensure that most NIS maps are kept up-to-date, even if an
|
|
|
|
update is missed because the slave was down at the time the update was
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -1060,7 +602,7 @@
|
|
|
|
You can add a slave at every time later. At first, make sure that
|
|
|
|
the new slave server has permissions to contact the NIS master. Then run
|
1998-12-30 04:42:36 +00:00
|
|
|
<tscreen><verb>
|
|
|
|
- % /usr/lib/yp/ypinit -s masterhost
|
|
|
|
+ % /usr/sbin/ypinit -s masterhost
|
|
|
|
</verb></tscreen>
|
1999-05-07 14:05:28 +00:00
|
|
|
on the new slave. On the master server, add the new slave server name
|
|
|
|
to <tt>/var/yp/ypservers</tt> and run <tt>make</tt> in <tt>/var/yp</tt>
|
|
|
|
@@ -1069,7 +611,7 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
If you want to restrict access for users to your NIS server, you'll have
|
|
|
|
to setup the NIS server as a client as well by running ypbind and adding the
|
|
|
|
-plus-entries to /etc/passwd _halfway_ the password file. The library
|
|
|
|
+plus-entries to /etc/master.passwd _halfway_ the password file. The library
|
|
|
|
functions will ignore all normal entries after the first NIS entry, and
|
|
|
|
will get the rest of the info through NIS. This way the NIS access rules
|
1999-05-07 14:05:28 +00:00
|
|
|
are maintained. An example:
|
|
|
|
@@ -1087,20 +629,20 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
news:*:9:9:news:/var/spool/news:
|
|
|
|
uucp:*:10:50:uucp:/var/spool/uucp:
|
|
|
|
nobody:*:65534:65534:noone at all,,,,:/dev/null:
|
|
|
|
- +miquels::::::
|
|
|
|
- +:*:::::/etc/NoShell
|
|
|
|
+ +dennis:::::::::
|
|
|
|
+ +*:::::::::/bin/false
|
|
|
|
[ All normal users AFTER this line! ]
|
|
|
|
tester:*:299:10:Just a test account:/tmp:
|
|
|
|
- miquels:1234567890123:101:10:Miquel van Smoorenburg:/home/miquels:/bin/zsh
|
|
|
|
+ obrien:1765:01:10::0:0:David O'Brien:/home/obrien:/bin/sh
|
|
|
|
</verb></tscreen>
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
-Thus the user "tester" will exist, but have a shell of /etc/NoShell. miquels
|
|
|
|
+Thus the user "tester" will exist, but have a shell of /bin/false. obrien
|
1998-12-30 04:42:36 +00:00
|
|
|
will have normal access.
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
Alternatively, you could edit the <tt>/var/yp/Makefile</tt> file
|
|
|
|
and set NIS to use
|
|
|
|
another source password file. On large systems the NIS password and group
|
|
|
|
-files are usually stored in <tt>/etc/yp/</tt>. If you do this the normal
|
|
|
|
+files are sometimes stored in <tt>/etc/yp/</tt>. If you do this the normal
|
|
|
|
tools to administrate the password file such as <tt>passwd</tt>, <tt>chfn</tt>,
|
|
|
|
<tt>adduser</tt> will not work anymore and you need special homemade tools
|
1998-12-30 04:42:36 +00:00
|
|
|
for this.
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -1108,89 +650,8 @@
|
|
|
|
However, <tt>yppasswd</tt>, <tt>ypchsh</tt> and <tt>ypchfn</tt> will
|
|
|
|
work of course.
|
1998-12-30 04:42:36 +00:00
|
|
|
|
|
|
|
-<sect1>The Server Program yps
|
|
|
|
-<nidx>NIS!yps server</nidx>
|
|
|
|
-<nidx>yps NIS server</nidx>
|
|
|
|
-<p>
|
|
|
|
-To set up the "yps" NIS server please refer to the previous paragraph.
|
|
|
|
-The "yps" server setup is similar, _but_ not exactly the same so
|
|
|
|
-beware if you try to apply the "ypserv" instructions to "yps"!
|
|
|
|
-"yps" is not supported by any author, and contains some security leaks.
|
1999-05-07 14:05:28 +00:00
|
|
|
-You really shouldn't use it !
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-The "yps" NIS server software can be found on:
|
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
1999-05-07 14:05:28 +00:00
|
|
|
- Site Directory File Name
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
- ftp.lysator.liu.se /pub/NYS/servers yps-0.21.tar.gz
|
|
|
|
- ftp.kernel.org /pub/linux/utils/net/NIS yps-0.21.tar.gz
|
1998-12-30 04:42:36 +00:00
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-<sect1>The Program rpc.ypxfrd
|
|
|
|
-<nidx>NIS|rpc.ypxfrd daemon</nidx>
|
|
|
|
-<nidx>rpc.ypxfrd daemon</nidx>
|
|
|
|
-<p>
|
|
|
|
-rpc.ypxfrd is used for speed up the transfer of very large
|
|
|
|
-NIS maps from a NIS master to NIS slave servers. If a
|
|
|
|
-NIS slave server receives a message that there is a new
|
|
|
|
-map, it will start ypxfr for transfering the new map.
|
|
|
|
-ypxfr will read the contents of a map from the master
|
|
|
|
-server using the yp_all() function. This process can take
|
|
|
|
-several minutes when there are very large maps which have
|
|
|
|
-to store by the database library.
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-The rpc.ypxfrd server speeds up the transfer process by
|
|
|
|
-allowing NIS slave servers to simply copy the master
|
|
|
|
-server's map files rather than building their own from
|
|
|
|
-scratch. rpc.ypxfrd uses an RPC-based file transfer protocol,
|
|
|
|
-so that there is no need for building a new map.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-rpc.ypxfrd can be started by inetd. But since it starts
|
|
|
|
-very slow, it should be started with ypserv. You need to start
|
|
|
|
-rpc.ypxfrd only on the NIS master server.
|
|
|
|
-
|
|
|
|
-<sect1>The Program rpc.yppasswdd
|
|
|
|
-<nidx>NIS!rpc.yppasswdd daemon</nidx>
|
|
|
|
-<nidx>rpc.yppasswdd daemon</nidx>
|
1998-12-30 04:42:36 +00:00
|
|
|
-<p>
|
|
|
|
-Whenever users change their passwords, the NIS password database and
|
|
|
|
-probably other NIS databases, which depend on the NIS password
|
|
|
|
-database, should be updated. The program "rpc.yppasswdd" is a server that
|
|
|
|
-handles password changes and makes sure that the NIS information will
|
|
|
|
-be updated accordingly. rpc.yppasswdd is now integrated in ypserv. You
|
|
|
|
-don't need the older, separate yppasswd-0.9.tar.gz or yppasswd-0.10.tar.gz,
|
|
|
|
-and you shouldn't use them any longer. The rpc.yppasswdd in ypserv 1.3.2
|
1999-05-07 14:05:28 +00:00
|
|
|
-has full shadow support. yppasswd is now part of yp-tools-2.2.tar.gz.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-You need to start rpc.yppasswdd only on the NIS master server. By default,
|
|
|
|
-users are not allowed to change their full name or the login shell.
|
1999-05-07 14:05:28 +00:00
|
|
|
-You can allow this with the -e chfn or -e chsh option.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-If your passwd and shadow files are not in another directory then
|
|
|
|
-/etc, you need to add the -D option. For example, if you have put
|
|
|
|
-all source files in /etc/yp and wish to allow the user to change
|
|
|
|
-his shell, you need to start rpc.yppasswdd with the following parameters:
|
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
|
|
|
- rpc.yppasswdd -D /etc/yp -e chsh
|
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
|
|
|
-or
|
|
|
|
-
|
|
|
|
-<tscreen><verb>
|
|
|
|
- rpc.yppasswdd -s /etc/yp/shadow -p /etc/yp/passwd -e chsh
|
|
|
|
-</verb></tscreen>
|
|
|
|
-
|
|
|
|
-There is nothing more to do. You just need to make sure, that
|
|
|
|
-<tt>rpc.yppasswdd</tt> uses the same files as <tt>/var/yp/Makefile</tt>.
|
|
|
|
-Errors will be logged using syslog.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
<sect>Verifying the NIS/NYS Installation
|
|
|
|
<nidx>NIS!verification of operation</nidx>
|
|
|
|
-<nidx>NYS!verification of operation</nidx>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
If everything is fine (as it should be), you should be able to verify
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -1208,9 +669,7 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
</verb></tscreen>
|
|
|
|
|
|
|
|
(where userid is the login name of an arbitrary user) should give you
|
|
|
|
-the user's entry in the NIS passwd file. The "ypcat" and "ypmatch"
|
|
|
|
-programs should be included with your distribution of traditional
|
|
|
|
-NIS or NYS.
|
|
|
|
+the user's entry in the NIS passwd file.
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
If a user cannot log in, run the following program on the client:
|
1998-12-30 04:42:36 +00:00
|
|
|
<tscreen><verb>
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -1267,47 +726,6 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
<nidx>NIS!troubleshooting</nidx>
|
|
|
|
<nidx>NIS!problems with</nidx>
|
|
|
|
|
|
|
|
-<p>
|
|
|
|
-Here are some common problems reported by various users:
|
|
|
|
-
|
|
|
|
-<enum>
|
|
|
|
-<item>The libraries for 4.5.19 are broken. NIS won't work with it.
|
|
|
|
-
|
|
|
|
-<item>If you upgrade the libraries from 4.5.19 to 4.5.24 then the
|
|
|
|
- su command breaks. You need to get the su command from the
|
|
|
|
- slackware 1.2.0 distribution. Incidentally that's where you
|
|
|
|
- can get the updated libraries.
|
|
|
|
-
|
|
|
|
-<item>When a NIS server goes down and comes up again ypbind starts
|
|
|
|
- complaining with messages like:
|
|
|
|
-
|
|
|
|
- <verb>
|
|
|
|
- yp_match: clnt_call:
|
|
|
|
- RPC: Unable to receive; errno = Connection refused
|
|
|
|
- </verb>
|
|
|
|
-
|
|
|
|
- and logins are refused for those who are registered in the
|
1999-05-07 14:05:28 +00:00
|
|
|
- NIS database. Try to login as root and kill
|
1998-12-30 04:42:36 +00:00
|
|
|
- ypbind and start it up again. An update to ypbind 3.3 or higher
|
|
|
|
- should also help.
|
|
|
|
-
|
1999-05-07 14:05:28 +00:00
|
|
|
-<item>After upgrading the libc to a version greater then 5.4.20, the YP tools
|
1998-12-30 04:42:36 +00:00
|
|
|
- will not work any longer. You need yp-tools 1.2 or later for
|
1999-05-07 14:05:28 +00:00
|
|
|
- libc >= 5.4.21 and glibc 2.x. For earlier libc version you need
|
|
|
|
- yp-clients 2.2. yp-tools 2.x should work for all libraries.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-<item>In libc 5.4.21 - 5.4.35 yp_maplist is broken, you need 5.4.36 or later,
|
1999-05-07 14:05:28 +00:00
|
|
|
- or some YP programs like ypwhich will segfault.
|
1998-12-30 04:42:36 +00:00
|
|
|
-
|
|
|
|
-<item>libc 5 with traditional NIS doesn't support shadow passwords over NIS.
|
|
|
|
- You need libc5 + NYS or glibc 2.x.
|
|
|
|
-<item>ypcat shadow doesn't show the shadow map. This is correct, the name of
|
|
|
|
- the shadow map is shadow.byname, not shadow.
|
1999-05-07 14:05:28 +00:00
|
|
|
-<item>Solaris doesn't use always privileged ports. So don't use password
|
|
|
|
- mangling if you have a Solaris client.
|
1998-12-30 04:42:36 +00:00
|
|
|
-</enum>
|
|
|
|
-
|
|
|
|
-
|
|
|
|
<sect>Frequently Asked Questions
|
|
|
|
<nidx>NIS!frequently asked questions</nidx>
|
|
|
|
|
1999-05-07 14:05:28 +00:00
|
|
|
@@ -1316,7 +734,7 @@
|
1998-12-30 04:42:36 +00:00
|
|
|
questions unanswered you might want to post a message to
|
|
|
|
|
|
|
|
<tscreen><verb>
|
|
|
|
- comp.os.linux.networking
|
|
|
|
+ hackers@FreeBSD.org
|
|
|
|
</verb></tscreen>
|
|
|
|
|
|
|
|
</article>
|