[Samba] Samba Print error

Andre Dieball andre.dieball at zycko.de
Thu Jan 16 11:33:03 GMT 2003


Hello 

I'm new to samba and this list, hopefully someone can help me with this strange problem.

Samba 2.2.3a-12
debian 2.2.20-idepci

I have the following smb.conf: 

---cut--- 
tux:/shr/pdfdropbox# more /etc/samba/smb.conf 
[global] 
        workgroup = xxxxxx 
        netbios name = tux 
        server string = tux 
        kernel oplocks = No 
        encrypt passwords = Yes 
        guest account = Nobody 
        invalid users = root 

# This tells samba to write log files per machine. 
        log file = /var/log/samba/%m 
# This sets an alternate log level. Default is 2. 
        log level = 3 

        security = domain 
;       security = server 
        password server = xx.xx.xx.xx 

        printer driver file = /etc/samba/printers.def 



        socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY 

        local master = No   

        interfaces = xx.xx.xx.xx/255.255.255.0 
   
        wins support = No 

        character set = ISO8859-15 
        client code page = 850 



[shr] 
   path = /shr 
   browseable = yes 
   writeable = yes 
   guest ok = yes 
   force user = nobody 
   public = yes 
[pdf] 
        comment = PDF Printer 
        path = /var/tmp 
        create mask = 0600 
        guest ok = yes 
        printable = Yes 
;       browseable = No 
        print command = /usr/bin/printpdf.sh %s %U 
        lpq command = 
        lprm command = 
        printer driver = HP C LaserJet 4500-PS 
        printer driver location = \\%h\printer$ 
        public = yes 

[pdfA3] 
        comment = A3 PDF Printer 
        path = /var/tmp 
        create mask = 0600 
        guest ok = yes 
        printable = yes 
        print command = /usr/bin/printpdf.sh %s %U 
        lpq command = 
        lprm command = 
        printer driver = HP Color LaserJet 8550-PS 
        printer driver location = \\%h\printer$ 
        public = yes 
[printer$] 
        path = /etc/samba/printdrivers 
        guest ok = yes 
        read only = yes 
        public = yes 
---cut--- 

This is the printpdf.sh:

---cut---
#!/bin/sh


# Simple script to convert a specified postscript file into a PDF document
# and place it in a location that is shared by the Samba server.
# 
# Arguments:
#   1st - The name of the spool file
#   2nd - The users name for email

# We will create the pdf into a temporary file based upon the current date and time.
# After we are finished, we'll rename it to a file with the same date, but ending
# in .pdf.  We do this because if a user tries to open a PDF that is still being written,
# they will get a message that it is corrupt, when it is actually just not done yet.

DATE=`date +%b%d-%H%M%S`

# The domain for e-mail
DOMAIN=xxxxxxx

# Directory in which to place the output
# Be sure this directory exists and is writable by the user that Samba
# is running as (for example, the nobody user)
OUTDIR=/shr/pdfdropbox
OUTFILE=PDF-$2-$DATE

cp $1 $OUTDIR/$OUTFILE.ps
ps2pdf $OUTDIR/$OUTFILE.ps $OUTDIR/$OUTFILE.temp
mv $OUTDIR/$OUTFILE.temp $OUTDIR/$OUTFILE.pdf
echo "Die PDF- Datei ist erstellt worden. Bitte speichern Sie den Anhang und löschen die Mail."| mutt -a $OUTDIR/$OUTFILE.pdf -s "PDF
 erstellt" $2@$DOMAIN
#rm $OUTDIR/$OUTFILE.ps
#rm $1
##rm $OUTDIR/$OUTFILE.pdf
---cut---

the following happens "sometimes", which means approximately 3 - 5 times 
a day: 

A user prints over the printer pdf, but the saved postscript file is not 
actually a postscript, it's a text-file (ending .ps) with the content of the machines 
logfile from /var/log/samba/$m. So it seams, that samba takes the wrong 
input to write the file ...... ?!?!?!?! 

Of course, after that, ps2pdf can't create the propper pdf and the 
client get's an empty pdf (323 bytes). 

When I restart the samba deamons (/etc/init.d/samba/restart) everything 
works fine again until the next time ...... 

Everything else works, so the customer can look into the /shr share or 
what ever ..... 

Clients are WinXP Pro 

Any ideas? 

Thanks a lot in advance. 

Rgds. 
        Andre 

Problem in Windows: Boot 
Problme in Linux: root 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Andre Dieball (andre.dieball at zycko.de) (andre.dieball at zycko.de).vcf
Type: text/x-vcard
Size: 526 bytes
Desc: Andre Dieball (andre.dieball at zycko.de) (andre.dieball at zycko.de).vcf
Url : http://lists.samba.org/archive/samba/attachments/20030116/8aa829ac/AndreDieballandre.dieballzycko.deandre.dieballzycko.de.vcf


More information about the samba mailing list