home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / n / bind / bind-4.001 / bind-4~ / bind-4.9.3-BETA9 / conf / Info.sunshlib.3 < prev    next >
Internet Message Format  |  1994-04-08  |  4KB

  1. Path: vixie!dungeon!jimmy@phri.nyu.edu
  2. From: dungeon!jimmy@phri.nyu.edu (Jimmy Kyriannis)
  3. Newsgroups: local.mail.dns.names
  4. Subject: Re: SunOS 4.1.3 & DNS w/o NIS?
  5. Date: 15 Mar 1994 22:07:08 -0800
  6. Organization: Vixie Enterprises
  7. Lines: 97
  8. Sender: daemon@vix.com
  9. Distribution: local
  10. Message-ID: <199403160442.XAA00610@dungeon>
  11. NNTP-Posting-Host: gw.home.vix.com
  12. X-To: namedroppers@nic.ddn.mil, coffinda@srs.gov
  13. X-Cc: jimmy@phri.nyu.edu
  14. X-Content-Type: text
  15. X-Content-Length: 3412
  16.  
  17. >   I must be doing most things right.  I set up a SPARCstation for someone 
  18. >   at our site.  I set it up as a cache-only name server pointing at a site 
  19. >   nameserver.  It all works.  I can nslookup either by specifying the local 
  20. >   machine (127.0.0.1) or the site name server as the first address in the 
  21. >   resolv.conf file.
  22. >   
  23. >   My problem is that I had attempted to set this up without using NIS, but 
  24. >   name resolution didn't work until I started using NIS (as if it couldn't 
  25. >   find the name server.)  It seems to me that there must be a way to use 
  26. >   DNS without NIS (using SunOS 4.1.3.)
  27. >   
  28. >   If it ought to work, and I've only experienced an anomoly, can anyone 
  29. >   propose a fix and/or a circumstance under which I'd experience this?
  30. >   
  31. >   Any help or information will be appreciated.
  32. >   
  33. >   Dave Coffin
  34. >   coffinda@srs.gov
  35. >   
  36.  
  37.  
  38. This is an easy one...  the SunOS C library (pre SunOS v5.x) uses only NIS
  39. lookup routines for hostname resolution.  You haven't done a thing wrong; Sun
  40. just wants the whole world to run NIS intead of DNS.
  41.  
  42. To fix this problem, you have to rebuild libc, replacing the NIS hostname
  43. resolution routines with DNS routines.
  44.  
  45.  
  46. Here's exactly what you have to do:
  47.  
  48. 0- su root
  49. 1- cd /usr/lib/shlib.etc
  50.  
  51. If there are no files in this directory, you have to run suninstall and install
  52. the "shlib custom" stuff.
  53.  
  54. 2- mkdir tmp; cd tmp
  55. 3- ar x ../libc_pic.a
  56. 4- ar x /usr/lib/libresolv.a
  57. 5- rm __.SYMDEF
  58. 6- mv rpc_dtablesize. rpc_dtablesize.o
  59. 7- mv rpc_commondata. rpc_commondata.o
  60. 8- rm gethostent.o
  61. 9- rm strcasecmp.o
  62. 10- cd ..
  63.  
  64. 11- Edit the Makefile, and add "-ldl" right after the "ld" in the ld commands.
  65.     (This should not be done on a pre-SunOS v4.1.2 box.)
  66.  
  67. 12- Edit the file "lorder-sparc", removing the NIS gethostname routine and
  68.     replace it with the DNS routines:
  69.         - delete the line containing the entry "gethostent.o" and insert the
  70.           following 8 lines in its place:
  71.                 gethostnamadr.o
  72.                 sethostent.o
  73.                 res_query.o
  74.                 res_mkquery.o
  75.                 res_send.o
  76.                 res_debug.o
  77.                 res_comp.o
  78.                 res_init.o
  79.  
  80. 13- Create the new library with the command "make libc.so".  This will create
  81.     a file called "libc.so.i.j.k", where i, j & k are the version numbers of
  82.     your library.
  83.  
  84. 14- To test your new library, type (from csh) "setenv LD_LIBRARY_PATH `pwd`"
  85.     while staying in the current directory (/usr/lib/shlib.etc).  You should
  86.     now be able to ftp, telnet, ping, etc. any host on the Net.
  87.  
  88. 15- Once you're convinced things are fine, install the library into the system:
  89.        - cp -p libc.so.i.j.k /usr/lib
  90.          ldconfig
  91.          unsetenv LD_LIBRARY_PATH
  92.  
  93.  
  94. Now, these steps will not make NIS hostname lookups possible; it's either NIS
  95. or DNS - not both.  The only reason I can think of wanting to use NIS lookups
  96. would be to support diskless clients.  I'm sure you can even get that to work
  97. with DNS, but I haven't had the time to work it out.
  98.  
  99. If you ever want to switch back to NIS lookups, you can either do it
  100. temporarily by setting LD_LIBRARY_PATH to a directory containing a copy of
  101. only the older libc, or you can just remove the library you just built.
  102.  
  103.  
  104. Let me know if you have any problems,
  105.  
  106.  
  107. Jimmy Kyriannis
  108.  
  109. --------------------------
  110. dungeon!jimmy@phri.nyu.edu
  111.  
  112. "Do... or do not.  There is no try."   - Yoda
  113.  
  114.