hi there. i am setting up an SME 7.2 PDC which will be the DC and central print server for all remote offices over VPN and also configured for "Point and Print". this is so that we can keep a central system for all printers and drivers and hopefully manage print quotas (using CUPS). i have been experimenting with both LPRng and CUPS however both systems use the "Samba Printer Port" and this is my issue.
when a remote office connects to a printer hosted on the PDC, it creates a "Samba Printer Port" and the PDC manages the print job and you CANNOT create additional ports. this means that if the PDC is on 10.0.1.x and the printer and client are on 10.1.1.x, the print job is sent from the local network 10.1.1.x over VPN to 10.0.1.x and transported back again to the local printer on 10.1.1.x.
it would be far more efficient for the print job to go directly from the client to the printer on the local network 10.1.1.x rather than route through 10.0.1.x over VPN. i imagine that when 100 staff are printing this will destroy the network and VPN anyhow. i have looked into samba documentation and it says:
The concept of a "port" is fairly foreign to UNIX hosts. Under Windows NT/2000 print servers, a port is associated with a port monitor and generally takes the form of a local port (i.e. LPT1:, COM1:, FILE:) or a remote port (i.e. LPD Port Monitor, etc...). By default, Samba has only one port defined--"Samba Printer Port". Under Windows NT/2000, all printers must have a valid port name. If you wish to have a list of ports displayed (smbd does not use a port name for anything) other than the default "Samba Printer Port", you can define enumports command to point to a program which should generate a list of ports, one per line, to standard output. This listing will then be used in response to the level 1 and 2 EnumPorts() RPC.
Default: no enumports command
Example: enumports command = /usr/bin/listports
by creating additional ports i imagine that i could then forward print jobs to the local printer direct. i have managed to get the enumports command to funtion as a custom-template in smb.conf global variables, however i cannot find any information on how the listports "program" should be written. if has anyone had experience in writing a listports file could you please explain how it works.
i did find this on lists.samba.org however i end up with no ports at all when i create the listports "program" as suggested:
> How to use enumports command, "you can define enumports command to point
> to a program which should generate a list of ports, one per line, to
> standard output" What does that mean? The program look like what?
-----cut here------------------
#!/bin/
echo "LPT1:"
echo "LPT2:"
echo "LPT3:"
-----cut here------------------
regards,
brentonv
EDIT: i just found
http://lll.lu/Presentations/LinuxDay2006/listports but same result. no ports at all. this is what i get when i run testparm:
[root@sandbox ~]# testparm /etc/e-smith/templates-custom/etc/smb.conf/10globals
Load smb config files from /etc/e-smith/templates-custom/etc/smb.conf/10globals
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
enumports command = /home/e-smith/files/samba/netlogon/listports
[root@sandbox ~]#
and here is the contents of /home/e-smith/files/samba/netlogon/listports from
http://lll.lu/Presentations/LinuxDay2006#!/bin/sh
cat <<EOF
port1
port2
testport
xyz
EOF
can someone please test this and see if you can get ports to show. i don't know what i am doing wrong. thanks again.