s i s t e m a o p e r a c i o n a l m a g n u x l i n u x | ~/ · documentação · suporte · sobre |
8. What do you need to set up NIS+ ?8.1. The SoftwareThe Linux NIS+ client code was developed for the GNU C library 2. 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 not work with other libc5 versions. 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, RedHat or SuSE Linux. 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. The NIS+ client software can be obtained from:
You should also have a look at http://www.suse.de/~kukuk/nisplus/ for more information and the latest sources. 8.2. Setting up a NIS+ clientIMPORTANT: 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! After installing the new libc and nis-tools, create the credentials for 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, 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
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. If you don't know what the NIS+ domain name is on your network, ask your system/network administrator. Now you should change your /etc/nsswitch.conf file. Make sure that the only service after publickey is nisplus ("publickey: nisplus"), and nothing else! Then start keyserv and make sure, that it will always be started as first daemon after portmap at boot time. Run
"niscat passwd.org_dir" should now show you all entries in the passwd database. 8.3. NIS+, keylogin, login and PAMWhen 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 user, if it was compiled against glibc 2.1. For a PAM aware login, you have to change the /etc/pam.d/login file to use pam_unix2, not pwdb, which doesn't support NIS+. An example:
8.4. The nsswitch.conf FileThe 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
specifies that host lookup functions should first look in the local /etc/hosts file, followed by a NIS+ lookup and finally through the domain 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:
|