I got ypcat fixed! heres how you do it!

I got ypcat fixed! heres how you do it!

Post by B'iche » Wed, 16 Aug 2000 13:55:58



        This took me DAYS to trace and kill this bug, I am posting
this info here to spare anyone else the sleepless nights and the
aggrevatiion.
        The clue to my problem was posted at
http://www.suse.de/~kukuk/nis/mini-faq.html The section that gave me
the clue was this question
     * My ypserv is running on Slackware 4.0 and I get internal errors
       from ypcat or ypserv dies with a seg.fault
       It seems the gdbm on Slackware 4.0 is broken. At first try to
       recompile gdbm. If this doesn't help, recompile ypserv with the
       new gdbm.

        Btw Slackware 3.9 and 4.0 use the same libgdbm! I have not
tried the older slackware ones.
        Now the part that bites one badly. just recompiling the
gdbm-1.7.3 librairy without the shared libs package will not work as
the old shared libs gotta go! Heres the replacements that work
ftp://metalab.unc.edu/pub/Linux/libs/db/gdbm-1.7.3-ELF.tar.gz
ftp://metalab.unc.edu/pub/Linux/libs/db/gdbm-1.7.3-bin.tar.gz
these easily install! you can even use installpkg to do it! (if you
want to use pkgtool change the .tar.gz to .tgz first!
        The second one is the gdbm-1.7.3 lib ALREADY compile for
libc5.
        Heres what happens with the buggy libgdbm system. if you type
from /usr/lib/yp this line and get a segmentation fault. you need
these. (this will only work if you already got your datebase compiled
first using /usr/lib/yp/ypinit -m
makedbm -u /var/yp/$domainname/passwd.byname
you sholuld get a whole list as follows
        you replace $domainname with your domain. in my case pinkrose
in my case doing
makedbm -u /var/yp/pinkrose/passwd.byname should result in
 (NOTE snipped to save space and protect my users)
bin bin:*:1:1:bin:/bin:
guest guest:*:405:100:guest:/dev/null:/dev/null
ftp ftp:*:404:1::/home/ftp:/bin/bash
YP_INPUT_NAME /etc/passwd
shutdown shutdown:*:6:0:shutdown:/sbin:/sbin/shutdown
nobody nobody:*:65534:100:nobody:/dev/null:
lp lp:*:4:7:lp:/var/spool/lpd:
YP_OUTPUT_NAME passwd.byname
halt halt:*:7:0:halt:/sbin:/sbin/halt
daemon daemon:*:2:2:daemon:/sbin:
root root:IhpNeE27nqVjw:0:0:root:/root:/bin/bash
games games:*:12:100:games:/usr/games:
man man:*:13:15:man:/usr/man:
mail mail:*:8:12:mail:/var/spool/mail:
sync sync:*:5:0:sync:/sbin:/bin/sync

operator operator:*:11:0:operator:/root:/bin/bash
YP_MASTER_NAME pinkrose.local.net
YP_LAST_MODIFIED 966262529
 if you only get a line or two and hit Segmentation Fault. get those
gdbm shared libs!
        After you fix that typing ypmatch nobody passwd (I chose this
as it seems to be common on slackware 3.9
nobody:*:65534:100:nobody:/dev/null:

        Related to the above should I also  replace any other shared
libs to be safe (yes I know, glibc2 is better) My crufty slackware 3.9
had an ancient runtime glibc 2.0.x libc6!
        Who has the precomiled libc6 ver 2.1? share libs?

--

                        B'ichela

 
 
 

1. ypcat passwd and ypcat hosts

when I log into an NIS client as a regular user, I can do

ypcat passwd

and get a list of all users

but

ypcat hosts gives:

No such map hosts.byname. Reason: No such map in server's domain

also ypcat anything gives the same message but passwd.

Why?

2. Hex values for colors

3. Now I've done it! Help linking libraries!!!!!!!

4. Space Shuttle uses Windows software almost exclusively

5. 1.1.79 Console Driver (Here's how to fix it!)

6. News Problems

7. Microsoft provides a stable OS and is charitable while doing it!

8. What does this mean?

9. I made it! Was: Fixed Frequency Monitor

10. Finally Done it!

11. I fixed it!!!

12. Help still needed... getting there, dang it!

13. I done it!!!