Наши партнеры








Книги по Linux (с отзывами читателей)

Библиотека сайта rus-linux.net

7.5. Macintosh-style File and Print Services with Netatalk

Linux can also provide Appleshare services (eg. Macintosh-style network file & printer sharing), using the Netatalk package. This section will describe how to configure shares, and how to access them from client machines.

In order to use Netatalk, you will need to have Appletalk networking support in your Linux kernel. Stock kernels from Red Hat usually already include this support as a module, or you can compile your own custom kernel with such support.

Note: Note: Make sure Appletalk support is compiled in as a module and not included as part of the kernel (see Section 10.4 for details on how to upgrade or customize the Linux kernel). Otherwise you will have difficulties when stopping and then restarting the Netatalk daemon.

Once you have ensured your kernel is capable of supporting Appletalk, you will need to install the Netatalk package. Because Netatalk is not included with the Red Hat distribution, you will have to download and install a copy. The Netatalk package can be found on Red Hat's "contrib" site, at ftp://ftp.redhat.com/contrib/libc6/i386/.

After Netatalk has been installed, you may need to modify one or more configuration files in ``/etc/atalk/''. Most of the files contain sample configuration examples, and therefore are at least somewhat self-documenting. The files are:

config

This file contains configuration information for tuning your Netatalk daemon. This information is specified in environment variables, and this file is "sourced" (ie. read) by the Netatalk start up script before the service is started. You can specify the number of simultaneous connections, whether or not guest logins are allowed, etc. You will almost certainly want to modify this file according to your needs.

atalk.conf

This file contains information on which network interface to use, as well as your Appletalk routing, name registration, and other related information. You will likely not need to modify this file; the required network information is detected and added to this file the first time you start the Netatalk server. However, you may wish to add your server name.

Note: Note: Type ``man atalkd'' for more information on this file.

afpd.conf

This file allows you to specify additional parameters which are passed to Netatalk by means of command-line options. You can specify which port or IP address you wish to run the Netatalk server on, add a login message that is displayed to connecting users, as well as other related options. You will likely not need to modify this file.

Note: Note: Type ``man afpd'' for more information on this file.

papd.conf

The file contains configuration information for enabling Mac users to print to network printer shares. I haven't played with this yet, so unfortunately I can't offer any advice on it.

Note: Note: Type ``man papd'' for more information on this file.

AppleVolumes.default

This file lists the available file shares that a Mac user will see after logging in. To enable a share, enter the path to the file directory, followed by a textual description of it. For example:

~                "Home"
/archive/busdept "Business Department Common Files"

(The above will provide two shares to connecting Mac users: their home directory, as well as a shared area for the business department.)

Tip: Tip: A neat trick here is to set up shares with the same file paths under Samba, which would provide your users with platform- independent file shares for both your Mac as well as your Windows users. See Section 7.4 for details on using Samba.

AppleVolumes.system

This file also lists file shares just like ``AppleVolumes.default'' does, the difference being that these shares will be made available to all users, regardless of whether or not they log in. This file also contains file-type mappings. You will likely not need to modify this file unless you want to add general shares available to anyone; this is probably a bad idea for most people.

Once everything has been set up with appropriate configuration information, you can start the Netatalk services manually by typing:

/etc/rc.d/init.d/atalk start

(The services should start up automatically at system boot).

More information on Netatalk can be obtained from the Netatalk Home Page at http://www.umich.edu/~rsug/netatalk/. In addition, very helpful configuration information is available in the Linux Netatalk HOWTO, available at http://thehamptons.com/anders/netatalk/.