Desktop PC File and Print Services
Missouri UUG
20 January 1999

Why Bother?

Protocols & Terms

Windows Networking

NetBIOS
Network BIOS - an IBM networking protocol occupying OSI's Network (3) and Transport (4) layers. Somewhat analagous to TCP.
NetBEUI
NetBIOS Extended User Interface - a quick down & dirty implementation of NetBIOS.
SMB
A protocol developed by IBM/Microsoft which occupies the Session(5) and Presentation(6) OSI layers. Analagous to commands issued in the HTTP protocol.
Domain
A collection of "trusted" computers for Windows. Somewhat analagous to YP/NIS.
Workgroup
A domain without any of the security features.

AppleTalk Networking

AppleTalk, EtherTalk, TokenTalk
Apple networking protocols occupying Session (5) down through Network (3) or even Data Link (2 - AppleTalk only).
AppleShare
The protocol for sharing files and printers over AppleTalk, EtherTalk, or TokenTalk. Occupies the Presentation (6) layer.
AFP
AppleShare Filing Protocol. The Presentation (6) level protocol for file sharing
PAP
The AppleTalk printer sharing protocol. Occupies the Presentation (6) layer.

Compiling

Download Locations
Samba
http://us1.samba.org/samba/ftp/samba-latest.tar.gz
http://us1.samba.org/samba/ftp/bin-pkgs/
Netatalk
ftp://terminator.rs.itd.umich.edu/unix/netatalk/netatalk-1.4b2.tar.gz
ftp://ftp.u.washington.edu/public/asun/
Compile-time Configuration
Samba
Configuration is achieved through a gnu autoconf script.
Netatalk
Configuration is achieved through editing Makefiles in sys/<system-name>/.
Login Encryption
Samba
Built-in; nothing needs be changed.
Netatalk
Built-in; assumes that libdes is installed.
OS Support
Samba
Linux, SunOS, Solaris, SVR4, Ultrix, OSF1, AIX, BSDI, NetBSD, Sequent, HP-UX, SGI*, FreeBSD, NeXT, ISC, A/UX, SCO, Intergraph, Silicon Graphics Inc., Domain/OS and DGUX.
Also provides SMBfs for Linux
Netatalk
Linux (intel, sparc, axp), *BSD, sunos/sparc, ultrix/mips, solaris 2.5.x & 2.6
Requires a remade kernel on every OS

Run-time Configuration

Global Configuration
/etc/services
netbios-ns 137/tcp nbns
netbios-ns 137/udp nbns
netbios-dgm 138/tcp nbdgm
netbios-dgm 138/udp nbdgm
netbios-ssn 139/tcp nbssn
afpovertcp 548/tcp
afpovertcp 548/udp
Samba
Over 191 global configuration options - well documented, but overwhelming.
Important options: workgroup, security, encrypt passwords (update encrypted), map to guest, password server, smb password file, log level, log file, protocol, domain logons, guest account, guest ok, hosts allow/deny, printing
Netatalk
atalkd.conf: mostly, you need do nothing; sometimes (Solaris) you need only name the interface.
afpd.conf: mostly, blank. For options, it's well documented.
AppleVolumes.default: A list of path names to export, with ~ being home directories
AppleVolumes.system: A list of extensions <=> type/creator matchings.
Encrypting passwords
Samba
Brief overview of encryption and smbpasswd.
You can migrate passwords via the "update encrypted = true" parameter.
You turn on encrypted passwords through "encrypt passwords = true".
Netatalk
Need a separate file for each user - ~/.password
Sharing home directories
Note: This comes configured by default on both.
Samba
[homes]
   comment = Home Directories
   browseable = no
   read only = no
   create mode = 0750
Netatalk
AppleVolumes.Default: ~ on a line by itself
Sharing other directories
Samba
[share-name]
   comment = Some Comment
   browseable = Yes
   Guest OK = Yes
   read only = no
   create mode = 0750
Netatalk
AppleVolumes.default
path [name] [casefold=x] [codepage=y] [options=z,l,j] [access=a,@b,c,d]
  • casefold=[tolower|toupper|xlatelower|xlateupper]
  • codepage=<filename from nls directory>
  • options=prodos, options=crlf
  • access=user,@group,user
  • name=<name to be displayed in the chooser volume list>
Sharing printers
Samba
All Printers:
[global]
   printing=[bsd|sysv|aix|hpux|qnx|plp|lprng|softq]
   printcap name=/etc/printcap
   load printers = yes
[printers]
   comment = All printers associated with %h
   browseable = no
   printable = yes
   public = no
   writable = no
   create mode = 0700
A specific printer:
[printer name]
   comment = Description
   browseable = no
   printable = yes
   public = no
   writable = no
   create mode = 0700
   valid users = user user @group user
   path = /path/to/put/spool/files
   printer = printer.name.in.etc.printcap
Netatalk
papd.conf:
Printer name for the chooser:\
	:pr=etc.printcap.printer.name:\
	:pd=/path/to/a/ppd/file:\
	:op=operator-account:
SWAT
Samba Web Admin Tool

Utilities

smbclient
Useful for:
Viewing Windows Networking Resources
smbclient -L //netbiosname
smbclient //netbiosname/resource
Printing
smbclient //netbiosname/printername/ <password> -U <username> -N -P < printfile
samba-2.0.0/examples/smbprint
Annoying your friends
smbclient -M netbiosname
nmblookup
Discovering IP addresses for netbios names
nmblookup netbiosname
testparms
Utility that diagnoses your smb.conf file for errors
smbstatus
Utility that reports on current SAMBA usage
smbpassword utilities
addtosmbpass
Usage: addtosmbpass name1 [name2 ....] < smbpasswd.in > smbpasswd.out
smbpasswd
Like passwd
nbplkup
Discovering appletalk devices and EtherTalk addresses
nbplkup
nbplkup MacArchives:*@MU-COE-London
pap
Printing to an EtherTalk device
pap - spools files to an EtherTalk LaserWriter
psf - converts files to PostScript and invokes pap
megatron
Macintosh file converter
unbin
creates AppleDouble files from a .bin file
unhex
creates AppleDouble files from a .hqx file
unsingle
creates AppleDouble files from AppleSingle files
others
hqx2bin, single2bin
macbinary
creates a .bin file from .AppleDouble files
See Also
macutil

Misc. Topics

mounting
smbmount
mount smb filesystems on a Linux box
AFPFS
mount AFP filesystems on a Linux box
Resources
Samba
http://www.samba.org/samba/
Netatalk
The original umich site
Adrian Sun's download area
The Linux netatalk HOWTO
The Solaris netatalk HOWTO