Subject : SunOS 4.1.X »ó¿¡¼ NIS¾øÀÌ DNS¸¦ »ç¿ëÇÏ´Â ¹æ¹ý
Solution Description:
=====================
On SunOS 4.1.X, how to use DNS without NIS (unsupported method)
When we try to ping or telnet by hostname, we always get an
unknown host error. /etc/resolv.conf is in place, and nslookup
works fine. How can we get DNS working?
SOLUTION SUMMARY:
This is the same solution as can be found in the Infodoc #3886:
MAKING A LIBC.SO for DNS without NIS
This is a procedure that can be used to add name resolver
routines into shared libc library in SunOS_4.1.
*****************************************************************
NOTE: The Sun supported method of using DNS is via NIS, however
we understand the need for customers to be able to run DNS
without NIS which is why we provide the following procedure.
Customers should be warned that they use this method "At
their own risk," and Sun support will not be able to help
them with DNS related problems if they choose this method.
*****************************************************************
Load "SHLIB_CUSTOM" either from SunInstall or from
add_services.
Be sure to first have the file /etc/resolv.conf
properly configured. This can be tested first with
/usr/etc/nslookup.
-------------------------------------------------------------------------
1. Become super user:
% su (if necessary)
2. Make a temporary directory:
% cd /usr/lib/shlib.etc
% mkdir tmp
3. Change to the "tmp" directory that you just made, extract the pic .o from
libc_pic.a and rm the file __.SYMDEF. The reason why you needed to do two
"mv" commands is that "ar" truncated filenames over 16 characters.
% cd tmp
% ar x ../libc_pic.a
% rm __.SYMDEF
% mv rpc_dtablesize. rpc_dtablesize.o
% mv rpc_commondata. rpc_commondata.o
% ar x /usr/lib/libresolv.a
The libresolv.a (apparently) contains object modules that are
position-independent, so they can be added to the libc_pic modules
without fear.
4. Remove the old routine to do the hostname/addr resolution:
% rm gethostent.o
5. Remove the libresolv module that contains `strncasecmp' (which is now
in the main C library, so it is redundant):
% rm strcasecmp.o
6. % cd ..
7. Copy lorder-sparc to lorder-sparc.orig Edit the file lorder-sparc
and remove the reference to `gethostent.o' and add the references
to the resolver library routines by applying this patch:
remove: gethostent.o
add: gethostnamadr.o
sethostent.o
res_query.o
res_mkquery.o
res_send.o
res_debug.o
res_comp.o
res_init.o
% diff -rc2 lorder-sparc.orig lorder-sparc
*** lorder-sparc.orig Thu Feb 8 05:27:46 1990
--- lorder-sparc Mon Apr 9 12:58:59 1990
***************
*** 150,154 ****
getwd.o
getnetgrent.o
! gethostent.o << REMOVE
ypxdr.o
ttyname.o
--- 150,161 ----
getwd.o
getnetgrent.o
! gethostnamadr.o << ADD
! sethostent.o << ADD
! res_query.o << ADD
! res_mkquery.o << ADD
! res_send.o << ADD
! res_debug.o << ADD
! res_comp.o << ADD
! res_init.o << ADD
ypxdr.o
ttyname.o
8. % make libc.so
9. You should have some libc.so.x.y.z built in the current directory. Test
this library before installing by setting the environment
LD_LIBRARY_PATH to the current directory, for example:
% setenv LD_LIBRARY_PATH `pwd`
% your_favorite_test_cmd (i.e. ping, ftp, telnet)
Once you are satisfied that the new library works, install
it with the following commands:
% cp libc.so.x.y.z /usr/lib
% ldconfig
% unsetenv LD_LIBRARY_PATH
10. You are now running with the new library. Verify this by doing a trace
command of "date":
% trace date
The output should state that the new library is being used.
----------------------------------------------------------------------------
Revision History
ÀÛ¼ºÀÏÀÚ : 97.03.11
ÀÛ¼ºÀÚ : À̹ÎÈ£
¼öÁ¤ÀÏÀÚ :
¼öÁ¤ÀÚ :