--------------37A078634C58199B3A819761
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
All,
I have emerged from the basement after (2) days of mortal combat with my
UDB.. Here is a guide to upgrading for the adventurous:
--------------37A078634C58199B3A819761
Content-Type: text/plain; charset=us-ascii; name="alpha-nis.doc"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="alpha-nis.doc"
Redhat 4.0 (Colgate) NIS not-quite-HOWTO
After hearing persistant rumors that the latest development glibc for
Digital Alpha supported NIS clients, I decided to take a shot at
upgrading the installation on my UDB. After almost two full days of
hacking (and some shameful language), I have things more-or-less
working. I'd like to share my experience in the hopes that others may
benefit, and that the various developers (RedHat, glibc, etc.) may
squash more bugs.
What you will need:
o From ftp://ftp.redhat.com/pub/redhat/devel/axp/RedHat/RPMS :
NetKit-B-0.08-13.alpha.rpm
glibc-0.961212-3.axp.rpm
glibc-devel-0.961212-3.axp.rpm
glibc-info-0.961212-3.axp.rpm
glibc-static-0.961212-3.alpha.rpm
net-tools-1.32.alpha-2.axp.rpm
pam-0.54-4.axp.rpm
pamconfig-0.50-5.axp.rpm
pwdb-0.53-2.alpha.rpm
sh-utils-1.12-13.axp.rpm
util-linux-2.5-33.axp.rpm
o From ftp://ftp.redhat.com/pub/glibc :
glibc-nis-1.99.tar.gz
o From ftp://ftp.redhat.com/pub/redhat/devel/srpms/SRPMS :
yp-clients-2.2-7.src.rpm
o From ftp://ftp.uni-paderborn.de/pub/linux/local/yp :
ypbind-3.0.tar.gz
How to do it:
Step 1:
Place all the new rpm packages in your favorite place, then install
them in the following order. Note that it is necessary to use the
'--ignorearch' flag on all packages (Erik, something's broken here!),
and unfortunately the '--force' flag is required due to some odd
dependencies. So, for all the packages below, prefix the command with
'rpm --ignorearch --force ':
-i pwdb-0.53-2.alpha.rpm
-U pam-0.54-4.axp.rpm
-U pamconfig-0.50-5.axp.rpm
-U glibc-0.961212-3.axp.rpm
-U util-linux-2.5-33.axp.rpm
-U sh-utils-1.12-13.axp.rpm
-U net-tools-1.32.alpha-2.axp.rpm
-U NetKit-B-0.08-13.alpha.rpm
-U glibc-devel-0.961212-3.axp.rpm
-U glibc-info-0.961212-3.axp.rpm
-U glibc-static-0.961212-3.alpha.rpm
Now, run ldconfig and make sure that you can still log in from another
virtual console. If all goes well, on to the next step.
Step 2:
Un-tar the glibc-nis-1.99.tar.gz archive in a convenient directory,
then un-tar ypbind-3.0.tar.gz in the resulting 'nis' subdirectory.
Rename the new 'ypbind' subdirectory to 'ypbind-3.0' and apply
ypbind-3.0-glibc.diff against ypbind-3.0.
Do 'rpm -i yp-clients-2.2-7.src.rpm' to place the package contents in
your /usr/src/redhat/SOURCES directory. Un-tar yp-clients-2.2.tar.gz
in a convenient place, creating a yp-clients-2.2 directory. Apply the
patches supplied with the rpm.
Copy the source files found in nis/bsd-tools into the corresponding
directories under yp-clients-2.2, overwriting the original files as
they may exist. Delete the subdirectory containing the BSD ypbind
utility.
For all remaining directories in yp-clients, add the following line to
the Makefiles:
LIBS = -lnsl
For yppasswd, you must also add '-lcrypt'.
Now, from yp-clients-2.2, try 'make'. In theory, all the utilities
should build. You will see numerous warnings, but everything did
build and run..
Finally, cd into ypbind-3.0 and do a make.
If all goes well, run make install in yp-clients-2.2 and ypbind-3.0.
Yes, this will blow your package management - sorry.
Step 3:
Create /etc/yp.conf with a single line:
ypserver <your_server_name_here>
Create /etc/nsswitch.conf:
----- Cut here
#
# /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 or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# [NOTFOUND=return] Stop searching if not found so far
#
passwd: db files nis
group: db files nis
hosts: db files nis
------ Cut here
Create /etc/networks:
default 0.0.0.0
loopnet 127.0.0.0
<your_net> aaa.bbb.ccc.ddd
Change the first line of /etc/host.conf to:
order hosts,nis,bind
Now, here's the wierd part. For some reason, once nsswitch.conf
exists, the various net tools (primarily ifconfig) will no longer
accept numerical IP addresses! It is quite literally necessary to
place every dotted-quad address in your hosts file as if it were a
host machine, ie:
127.0.0.1 localhost
192.168.244.65 alpha.steve.net alpha
192.168.244.50 air.steve.net air
192.168.244.57 cy.steve.net cy
255.0.0.0 loopmask
127.255.255.255 loopcast
192.168.244.255 mycast
255.255.255.0 mymask
The point is that your network configuration files want to be
something like this (modify per your installation, please..):
/etc/sysconfig/network:
NETWORKING=yes
HOSTNAME=alpha
DOMAINNAME=steve.net
GATEWAY=air
GATEWAYDEV=eth0
/etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
IPADDR=alpha.steve.net
NETMASK=mymask
NETWORK=steve
BROADCAST=mycast
ONBOOT=yes
BOOTP=no
/etc/sysconfig/network-scripts/ifcfg-lo:
DEVICE=lo
IPADDR=localhost
NETMASK=loopmask
NETWORK=loopnet
BROADCAST=loopcast
ONBOOT=yes
BOOTP=no
Basically, anywhere that a numeric IP number, network or mask would
have occurred it is necessary to fake the resolver into looking it up
as if it were a network or host! This is absolutely a bug, and took
me the better part of this afternoon to work around. Please, somebody
in the library development team, fix this??
Final stuff:
Add some lines to the /etc/rc.d/init.d/nfs file to setup the
domainname on boot:
domainname `cat /etc/defaultdomain`
(or whatever). I'm assuming you understand NIS, so I'll not go into
it any deeper.
Make SURE you have a recovery method available before rebooting!!
With most RedHat systems, you should be able to start from MILO into a
rescue shell by entering something like:
> boot sda2:vmlinux.gz linux 1
Just be sure you know what you are doing, then reboot.
After everything comes up, start ypbind as root. Rejoice in a working
NIS client!
You will definitely need to recompile just about anything that uses
crypt or name resolution. I rebuilt xdm, ncftp and a few others that
escape me. So far it works as advertised, but YMMV.
In case of problems:
Umm, as they say, if it breaks you get to keep both pieces.
Seriously, don't even THINK about doing this unless you have a sense
of adventure and the ability to throw the whole installation out and
start over.
Lastly, I've tried to be complete in this document by working from my
notes. However, so much hacking and cutting took place, it is quite
possible that I've overlooked an important step. I _would_ very much
appreciate any constructive input on anything presented here.
Steven Hirsch
shirsch@ibm.net
12/27/96
--------------37A078634C58199B3A819761--
-- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
Copyright © 1995-1997 Red Hat Software. Legal notices