Configuration of a simple print server is easy if you have all the right tools on your system.
Assumptions
-
The print server must require no administration.
-
The print spooling and processing system on our print server will be CUPS.
(Please refer to
CUPS Printing Support, for more information).
-
The print server will service only network printers. The network administrator
will correctly configure the CUPS environment to support the printers.
-
All workstations will use only PostScript drivers. The printer driver
of choice is the one shipped with the Windows OS for the Apple Color LaserWriter.
In this example our print server will spool all incoming print jobs to
/var/spool/samba until the job is ready to be submitted by
Samba to the CUPS print processor. Since all incoming connections will be as
the anonymous (guest) user, two things will be required to enable anonymous printing.
Enabling Anonymous Printing
-
The UNIX/Linux system must have a
guest
account.
The default for this is usually the account
nobody
.
To find the correct name to use for your version of Samba, do the
following:
$
testparm -s -v | grep "guest account"
Make sure that this account exists in your system password
database (/etc/passwd ).
It is a good idea either to set a password on this account, or else to lock it
from UNIX use. Assuming that the guest account is called pcguest ,
it can be locked by executing:
root# passwd -l pcguest
The exact command may vary depending on your UNIX/Linux distribution.
-
The directory into which Samba will spool the file must have write
access for the guest account. The following commands will ensure that
this directory is available for use:
root#
mkdir /var/spool/samba
root#
chown nobody.nobody /var/spool/samba
root#
chmod a+rwt /var/spool/samba
The contents of the smb.conf file is shown in
the Anonymous Printing example.
Example7.2.smb.conf for Anonymous Printing
# Global parameters |
|
[global]
|
workgroup = MIDEARTH
|
netbios name = GANDALF
|
security = SHARE
|
passdb backend = guest
|
printing = cups
|
printcap name = cups
|
|
[printers]
|
comment = All Printers
|
path = /var/spool/samba
|
printer admin = root
|
guest ok = Yes
|
printable = Yes
|
use client driver = Yes
|
browseable = No
|
|