ppr2samba.8


NAME

ppr2samba - Generates Samba configuration files from PPR configuration files


SYNOPSIS

ppr2samba


DESCRIPTION

This program reads the PPR printer and group configuration files and generates a configuration file for the SMB server known as ``Samba''. Samba can use the list of printers in the file as a list of printers it should share with LAN Manager clients.

Since it can ownly perform one function, and that a harmless one, any user may run ppr2samba. This program places its output in the files /etc/ppr/smb-include.conf and /etc/ppr/printcap. The file /etc/ppr/printcap is genated only for compatibility with previous versions of ppr2samba.

In order for Samba to read the contents of /etc/ppr/smb-include.conf, you must insert appropriate lines in Samba's smb.conf file. Make sure the line ``printing = bsd'' appears in the [global] section. Then copy the [pprproto] section from from /usr/ppr/install/smb.conf.example and insert it in smb.conf.

The [pprproto] section defines commands to submit jobs, delete jobs, list the queue, and so forth. It also has a path= line which indicates a directory where Samba should create temporary files containing the print jobs. You should edit this section if some of the paths are not correct for your installation.

A few notes on the [pprproto] section from smb.conf.example: The B<-X %m@samba> in the print command and lprm command defined in [pprproto] make sure that a user can only delete his own jobs. The B<-f %m> in the print command causes the name of the sending machine to appear as the user on banner pages and in queue listings. The sequence B<-e responder -m samba -r %m> causes error messages to be sent back to the client through the use of the responder ``samba''. Notice also the use of -U which causes the file to be deleted after it is printed. The sequence -C '' prevents the job title from defaulting to the file name since the name of the temporary file is not generally meaningful. The -I causes any switchset attatched to the printer or group to be included (see ppad switchset and ppad group switchset). The print command is put into the background because it can take a long time to run if certain filters are invoked.

Just after the [pprproto] section you should include the line "Bppr2samba. This file contains one section for each printer or group of printers which PPR is operating. Each of these sections will define a few unique values and then include the value in the [pprproto] section. It is done this way so that the list of commands will not have to be repeated over and over again. Also, since you enter the [pprproto] section into smb.conf and can change to suit your taste it is not necessary to customize ppr2samba for each installation.

You should also make the Samba guest user a member of the group ``pprprox''. If you don't do this, jobs submitted by guest users will appear in the MS-Windows print manager under the name of the Samba guest user and Print Manager will grey out the Document/Delete Document option.

When ppr2samba is reading printer and group configuration files it recognizes two configuration lines which are not recognized by other programs. These lines allow the MS-Windows printer driver name to be given when ppr2samba can't correctly determine it and allow certain printer and groups to be excluded from those shared with Samba.

The first line is ``ms-driver-name:'' which can be used to override the value ppr2samba would select for the ``printer driver ='' line in smb-include.conf.

The second is ``ppr2samba:''. This takes an numberic argument. If the argument is non-zero, the printer or group is included in the files generated by ppr2samba, if it is zero it is ommited. If no such line is present, then the printer or group is included. The ``ppr2samba:'' line can take an additional argument which is the name to use in the ``copy ='' line in smb-include.conf. If this second argument is ommited then ``pprproto'' is used.


SEE ALSO

smb.conf(5), ``Installing and Using PPR'', the ppad manpage (8).


HISTORY

PPR was written at Trinity College during 1993--1997.


AUTHORS

David Chappell, Trinity College Computing Center, Hartford, Connecticut.


BUGS

None known.