home *** CD-ROM | disk | FTP | other *** search
/ IT.SOFT 22 / ITSOFTCD_22.iso / mac / linux22 / slackware3.6 / DOCS / NETATALK-HOWTO.;1 < prev    next >
Encoding:
Text File  |  1998-10-21  |  12.3 KB  |  280 lines  |  [TEXT/hscd]

  1. The Linux Netatalk-HOWTO
  2. Anders Brownworth, <anders@thehamptons.com>
  3. Version 2.0.0, October 7, 1998
  4. http://thehamptons.com/anders/netatalk/
  5.  
  6.      Netatalk is a package that lets a Unix machine supply
  7.      Appletalk print and file services on a LAN. The package supports
  8.      AppleShare IP and classic Appletalk protocols. With netatalk,
  9.      Macintosh computers can mount Unix volumes and print to Unix print
  10.      spools as if they were standard Appletalk network devices.
  11.      
  12.      This document is intended as a guide to help the Linux system
  13.      administrator set up and administrate netatalk. Linux is a freely
  14.      distributable POSIX compliant U*ix for 386, 486, Pentium,
  15.      PowerMacintosh, Sun and DEC Alpha hardware as well as several other
  16.      experimental platforms. (SGI, etc.)
  17.      
  18.      For those of you who are impatient, there is the Linux
  19.      Netatalk-HOWTO: Guide for the Impatient.
  20.      [http://thehamptons.com/ander/netatalk/impatient.html]
  21.      
  22.      Netatalk is brought to you by our friends at The Research Systems
  23.      Unix Group at The University of Michigan. [netatalk@umich.edu]
  24.      
  25.      The origional netatalk homepage is available at:
  26.      [http://www.umich.edu/~rsug/netatalk/]
  27.      
  28.      Another place to look for netatalk info is Bill McGonigle's
  29.      Faq-O-Matic at:
  30.      [http://threepio.hitchcock.org/cgi-bin/faq/netatalk/faq.pl]
  31.      
  32.      AppleShare IP support (AFP/TCP) as well as the latest bug fixes and
  33.      enhancements are included with Adrian Sun's version of netatalk
  34.      called netatalk+asun. This HOWTO covers Adrian's version of
  35.      netatalk as it is the most up to date. The "old version" of this
  36.      HOWTO can be found at:
  37.      [http://thehamptons.com/anders/netatalk/old/]
  38.      
  39.      Netatalk+asun lets a Macintosh see a Linux box. To do the reverse
  40.      (have the Linux box see the Mac) you need to install the afpfs
  41.      module from:
  42.      [http://www.odyssey.co.il/~heksterb/Software/afpfs/]
  43.      
  44.      Comments and corrections are very welcome. Someone had sent me a
  45.      diff of my pages correcting my horrible spelling, and I proceeded
  46.      to blow away my mailbox by mistake so I lost it. Anyone wanting to
  47.      help out with that would be greatly appreciated.
  48.      
  49.      If you have problems with netatalk, usually a good place to post
  50.      them is to the linux-atalk listserv. Subscribe to it by sending
  51.      mail to listserv@netspace.org with no subject and a body which
  52.      reads SUBSCRIBE LINUX-ATALK (Your Full Name). To unsubscribe, send
  53.      mail to the same place with the message text UNSUBSCRIBE
  54.      LINUX-ATALK. Posts to the listserv should be sent to
  55.      linux-atalk@netspace.org.
  56.      
  57.        ______________________________________________________________
  58.                                       
  59.                              What you will need:
  60.      * A computer running Linux with a 2.0.* or newer kernel (with
  61.        source) and compilers.
  62.      * A copy of the latest netatalk+asun source from
  63.        [ftp://ftp.u.washington.edu/public/asun/]
  64.           + RedHat makes an RPM of netatalk+asun at
  65.             [ftp://ftp.redhat.com/pub/contrib/i386/netatalk-1.4b2+asun2.1.*.i386.rpm]
  66.           + Debian makes binaries available at
  67.             [http://cgi.debian.org/www-master/debian.org/Packages/stable/net/netatalk.html]
  68.           + Origional netatalk code (without TCP/IP support) can be found
  69.             at [ftp://terminator.rs.itd.umich.edu/unix/netatalk/]
  70.      * LAN with a Mac (don't really need this but then, what's the
  71.        point?)
  72.        ______________________________________________________________
  73.                                       
  74. Decompress and untar the source code with the following commands:
  75.      
  76.      elmer:~/src> gzip netatalk-1.4b2+asun2.0a18.2.tar.gz
  77.      elmer:~/src> tar -xvf netatalk-1.4b2+asun2.0a18.2.tar
  78.      
  79.      or if you downloaded the rpm version:
  80.      
  81.      eyore:~/src> rpm -i netatalk-1.4b2+asun2.1.0-5.i386.rpm
  82.      
  83. Edit the Makefile in the root of the source tree:
  84.      
  85.      Set the destination directory:
  86.      
  87.      DESTDIR=/usr/local/atalk, which is the default is probably OK for
  88.      most installations.
  89.      
  90. Edit the etc/afpd/Makefile if you need shadow password support.
  91.      
  92.      Most major Linux distributions such as RedHat use shadow password
  93.      suites. If you don't know if you have shadow passwords, look at
  94.      your password file. If you have an "x" where the encrypted password
  95.      should be, you have shadow passwords and you need to define shadow
  96.      passwords in your Makefile. ( Sample line from a shadow password
  97.      file: root:x:0:0::/root:/bin/tcsh )
  98.      
  99.      Add -DSHADOWPW to the etc/afpd/Makefile like so:
  100.      CFLAGS= ${DEFS} ${AFSDEFS} ${KRBDEFS} ${DESDEFS} ${OPTOPTS} ${INCPATH} \
  101.              ${PAMDEFS} -DAPPLCNAME -DCRLF -DSHADOWPW # -DDOWNCASE
  102.  
  103. Install a DES library if you don't already have one.
  104.      
  105.      Get a copy of libdes from
  106.      [ftp://ftp.psy.uq.oz.au/pub/Crypto/DES/libdes.tar.gz].
  107.      
  108.      Untar it somewhere and do a make.
  109.      
  110.      To optionally install libdes on your system (which isn't a half bad
  111.      idea) type make install.
  112.      
  113.      You will need the file des.h which should be there if the make was
  114.      successfull.
  115.      
  116.      Copy des.h to your netatalk include directory: cp des.h
  117.      /path/netatalk/include/.
  118.      
  119. Install TCP Wrappers if it's not already installed.
  120.      
  121.      To compile, netatalk needs tcpd.h so if you don't already have it,
  122.      download the TCP Wrappers package from
  123.      [ftp://ftp.cert.org/pub/tools/tcp_wrappers/].
  124.      
  125.      Type cp tcpd.h /path/netatalk/include/ to copy tcpd.h to your
  126.      netatalk source include directory.
  127.      
  128.      You probably have tcpd on your system. In the rare case that you
  129.      don't, you'll want to compile it now by typing make
  130.      REAL_DAEMON_DIR=/usr/sbin linux and instal it. Look at the included
  131.      README file for installation instructions.
  132.      
  133. Compile netatalk
  134.      
  135.      The all important step: in your netatalk source directory, type
  136.      make.
  137.      
  138.      Make sure everything compiles up without an error. You may see some
  139.      warnings which are safe to ignore, but if you see the compiler exit
  140.      with some sort of error, try and see if you can figure out why it
  141.      is dying. Remember, the compiler is going to look in your include
  142.      directory for tcpd.h and des.h so make sure they are there.
  143.      
  144.      If you are really having trouble with the compile, try the tips
  145.      page. If you are really having trouble, you could download a
  146.      pre-compiled version of netatalk from the download page.
  147.      
  148.      [http://thehamptons.com/anders/netatalk/download.html]
  149.      
  150. Install netatalk
  151.      
  152.      Type make install in the source directory and netatalk will be
  153.      installed where you stated in the Makefile. (default is
  154.      /usr/local/atalk)
  155.      
  156. Edit /etc/services
  157.      
  158.      Add the following lines to your /etc/services file:
  159.      
  160.      rtmp            1/ddp           # Routing Table Maintenance Protocol
  161.      nbp             2/ddp           # Name Binding Protocol
  162.      echo            4/ddp           # AppleTalk Echo Protocol
  163.      zip             6/ddp           # Zone Information Protocol
  164.  
  165.      afpovertcp      548/tcp         # AFP over TCP
  166.      afpovertcp      548/udp
  167.  
  168. Copy atalkd.conf
  169.      
  170.      Type cp conf/atalkd.conf /usr/local/atalk/etc/. The simplest config
  171.      file for atalkd (like the one you just copied) is one with no
  172.      commands in it.
  173.      
  174.      atalkd is the "classic Appletalk" kernel interface. It will serve
  175.      as the link between the kernel appletalk module and the rest of the
  176.      classic Appletalk functions of netatalk. It will even take care of
  177.      Appletalk routing between multiple network cards.
  178.      
  179. Copy afpd.conf file
  180.      
  181.      Type cp conf/afpd.conf /usr/local/atalk/etc. This file sets Classic
  182.      Appletalk and Appleshare IP server options. Leaving it alone is the
  183.      easiest thing to do, however the default does not enable
  184.      AppleshareIP and there are quite a few configurable options in this
  185.      file so there is a section specific to it at:
  186.      
  187.      [http://thehamptons.com/anders/netatalk/afpd.conf.html]
  188.      
  189. Copy and edit AppleVolumes.*
  190.      
  191.      Type cp conf/AppleVolumes.default /usr/local/atalk/etc and cp
  192.      conf/AppleVolumes.default /usr/local/atalk/etc. The
  193.      AppleVolumes.default file is a listing of volume to path mappings,
  194.      so adding the lines:
  195.      
  196.      ~       Home
  197.      /music "Some Tunes"
  198.  
  199.      will cause three volumes to show up, one called Home which is the
  200.      user's home directory and one called Some Tunes that is the
  201.      directory /music. The AppleVolumes.system file is a listing of "dot
  202.      extensions" to type / creator mappings. A Mac file has two parts, a
  203.      data fork and a resource fork. Unix files are only one long list of
  204.      bits. Therefore, if you have the file test.txt created in Unix,
  205.      looking at it on the Mac will reveal an "Unknown Document" icon
  206.      unless there is an entry in the AppleVolumes.system file like so:
  207.      
  208.      .txt    TEXT    MSWD
  209.  
  210.      which will make it show up as a Microsoft Word document and will
  211.      launch Word when double-clicked. The default list of type / creator
  212.      mappings in the AppleVolumes.system file is probably adequate
  213.      unless youare planning on making many files in Unix and using them
  214.      on Macs. One possible reason to use a large type / creator map is
  215.      if you plan to export the same directory to Windows clients via
  216.      Samba.
  217.      
  218. Compile Appletalk in your kernel
  219.      
  220.      There are two kinds of Appletalk servers you can run, and both can
  221.      run at the same time. Classic Appletalk needs to run atalkd and
  222.      afpd while Appletalk over TCP/IP only requires that afpd be
  223.      running. Atalkd requires that Appletalk and TCP/IP support be
  224.      compiled into your kernel while Appletalk IP only requires TCP/IP
  225.      support. Many mainstream Linux distributions contain a kernel with
  226.      Appletalk already compiled in and everyone probably has TCP/IP. You
  227.      can check to see if your kernel supports Appletalk by typeing:
  228.      
  229.      dmesg | grep Apple
  230.  
  231.      If you see anything pop up such as Appletalk 0.17 for Linux
  232.      NET3.035 you have Classic Appletalk compiled into your kernel. If
  233.      not you could check to see if you have Appletalk inserted into the
  234.      kernel via a module by typeing:
  235.      
  236.      cat /proc/modules
  237.  
  238.      and seeing if Appletalk shows up there. If neither of these
  239.      statements show Appletalk, then you have to compile Appletalk into
  240.      the kernel and reboot, or compile Appletalk as a module and insmod
  241.      appletalk.o. If you need help compiling Appletalk into the kernel,
  242.      take a look at the Kernel-HOWTO. (usually included in major
  243.      distributions in the docs directory /usr/doc)
  244.      
  245. Start the server
  246.      
  247.      Now comes the moment of truth. Try to test a startup of the
  248.      netatalk server by running one of the rc.atalk scripts in the root
  249.      of the netatalk source tree. Type ./rc.atalk.sysv start and give it
  250.      a few seconds. This will start up a Classic Apletalk fileserver and
  251.      Appletalk IP if you have any TCP options set in the afpd.conf file.
  252.      Atalkd will take the longest to start as it checks out the network
  253.      before registering itself.
  254.      
  255.      Alternatively you could just run an Appletalk over TCP/IP server by
  256.      having a TCP server configured in the afpd.conf file and launching
  257.      afpd by hand:
  258.      
  259.      /usr/local/atalk/etc/afpd -F /usr/local/atalk/etc/afpd.conf
  260.  
  261.      If everything seems to have started up without complaning, go to a
  262.      Mac and open the chooser. (under the Apple menu on the left hand
  263.      side) Click on AppleShare and see if your netatalk server shows up.
  264.      (for AppleshareIP you have to click the AppleshareIP button and
  265.      type your machine IP or name in.
  266.      
  267.      With some luck you will be presented with a password prompt. You
  268.      can only log into the server with a non root account that has a
  269.      valid shell and a password of 8 or less characters. Guest access is
  270.      also permitted unless denied in afpd.conf. If you can't log in as
  271.      anyone but guest you probably don't have shadow password support
  272.      compiled into your netatalk executables. If you are able to login,
  273.      you will get a list of volumes which you can select and mount.
  274.      
  275. Enjoy!
  276.        ______________________________________________________________
  277.                                       
  278.         Origional document: [http://thehamptons.com/anders/netatalk/]
  279.  
  280.