[Samba] printer access slow

erik thijs erik__thijs at hotmail.com
Wed Feb 23 09:58:17 GMT 2005


Hi,

I installed a samba printer, that maps to a script to generate pdf files. It 
works, but there's a notable delay when selecting or printing to the 
printer: when I click 'print' in an application and I select the samba 
printer, there's a delay of about 5 to 10 seconds before the printer is 
accepted, and I can effectively print.

Any clues on what could be the cause (and the resolution :) ) See configs 
below...

samba version: 3.0.10

smb.conf (names have been masked):
=========================
[global]
        load printers = yes
        idmap gid = 10000-200000
        domain master = no
        winbind trusted domains only = yes
        show add printer wizard = yes
        encrypt passwords = yes
        public = yes
        realm = <MY DOMAIN REALM>
        wins proxy = no
        template shell = /bin/bash
        template homedir = /home/other
        wins support = no
        postscript = yes
        dns proxy = no
        netbios name = <NBNAME>
        printing = bsd
        idmap uid = 10000-200000
        password server = *
        workgroup = <WORKGROUP>
        os level = 0
        winbind enum groups = no
        security = ads
        preferred master = no
        winbind separator = -
        winbind cache time = 20

[pdfs]
path = /usr/local/pdfs
browseable = yes
writeable = yes
guest ok = yes

[smbpdf]
comment = PDF generator
path = /var/spool/samba
printable = yes
# %s = spool file, %U = uid + GID, %m = machine name, %I = ip, %H = homedir
print command = /usr/sbin/pdfprint %s %U %m %I %H '%J'
use client driver = yes
lpq command =
lprm command =
===============================

/usr/sbin/pdfprint:
===============================
OUTPUTPATH=/usr/local/pdfs
LOGFILE=$OUTPUTPATH/pdfcreate.rtf

FILENAME="$2-$6.pdf"

echo "converting file \"$6\", spooled to \"$1\" to file \"$FILENAME\" for 
user \"$2\" on machine \"$4\"... " >> $LOGFILE
echo "" >> $LOGFILE
/usr/bin/ps2pdf $1 "$OUTPUTPATH/$FILENAME" >> $LOGFILE 2>> $LOGFILE
echo "" >> $LOGFILE

echo "conversion finished, removing spoolfile \"$1\"" >> $LOGFILE
echo "" >> $LOGFILE
rm $1
echo "" >> $LOGFILE

echo "done, setting permissions" >> $LOGFILE
chown $2:$3 $OUTPUTPATH/$FILENAME >> $LOGFILE
chmod 700 $OUTPUTPATH/$FILENAME >> $LOGFILE
echo "" >> $LOGFILE
===============================

File permissions:
-rwxr-xr-x  1 root root 1283 Feb 22 12:36 /usr/sbin/pdfprint
drwxrwxrwt   3 root root 224 Feb 22 12:37 samba




More information about the samba mailing list