FreeBSD 6 Unleashed

After you have verified that FreeBSD can talk to your printer at the most basic level, you are ready to set up the lpd daemon and configure the spooler. Begin by creating a spool directory for the printer. Print spool directories are normally located in /var/spool/lpd, although there is nothing that says you can't put them somewhere else.

Decide on a name for the printer you are configuring. You can name the printer just about anything you want, but it's probably best to use a short but descriptive name, such as laserjet4100. You can also create aliases to access the printer by other names.

After you have decided on a name for the printer, create a spool directory for it. Here's an example:

# mkdir /var/spool/lpt/laserjet4100

After this, you will probably want to change the owner of the spool directory and also change the permissions so that users can't snoop around and look at other people's print jobs. All print spool directories should be owned by the user "daemon" and group "daemon," and they should have read, write, and execute permissions for the user and group, with no permissions for anyone else. The following commands will correctly set the ownership and permissions on the spool directory:

# chown daemon.daemon /var/spool/lpd/laserjet4100 # chmod 770 /var/spool/lpd/laserjet4100

You have now set up the spool directory; next you'll need to set up a text filter for lpd.

Категории