[Samba] Samba PDF printer...
lists at 9d8.com
Fri May 28 16:24:54 GMT 2004
Using Samba 2.2.8a on a Redhat 7.2 box
I set up a PDF generator relying on Samba and a shell script to create
This works fine but I have a further trouble that I am stumped by. The
files cannot be viewed from within a Citrix session (the point of the
entire exercise) unless they are available from this one NT Server
share. So if I mount a Windows NT server share under '/mnt/gpsc/pdfs'
and then redirect the output to that directory, everything looks like it
works but I get no output.
I can create/edit files, as a variety of users, on this NT share from
the Linux box so I think that part is fine but I cannot do this from
Samba. I would normally expect some sort of complaint in the form of a
log entry but nothing shows up in the logs (log level = 3).
---------8<----snip from smb.conf-----------
path = /mnt/gpsc/pdfs
invalid users =
read only = No
guest ok = Yes
[Create a PDF]
comment = Check your 'K:' drive for your .PDF file. Check in
the folder named 'PDFFiles'.
path = /tmp
guest ok = Yes
printable = Yes
print command = /usr/local/bin/printpdf %s %m %U
---------8<----end snip from smb.conf-----------
---------8<----snip from 'printpdf'-----------
# written by Blue Groper
# Last modified 29/9/03 (d/m/y)
# Modified by Anzac 25-1-04
# Modified by Steven Macfarlane 27.5.04 - Trying to get it to write to
# Script to generated pdf files and a message for Windows domain users
# with filename. Windows 98 clients must have WinPopup loaded.
# Count = value from /etc/pdf/pdfcount files. Used for part of output
# (%s from /etc/samba/samba.conf call)
# (%m from /etc/samba/samba.conf call)
# (%U from /etc/samba/samba.conf call)
# (Can be mapped in GPSC domain as network drive Q: if required for
# Write the variables somewhere, handy when it is broken
# Uncommment line below if no output file see if file is being created
# Must comment out MachineNetBiosName line for this to work
#echo "SambaPrintFileName: $1">/tmp/pdfdebug
# Machine name to check popup going to correct netbios name
echo "MachineNetBiosName: $2">/tmp/pdfdebug
# Username supplied to samba for creating filename
echo "SambaUserName: $3">>/tmp/pdfdebug
# Options are not essential, but useful to control finer features of pdf's
# Counter ensures meaningless but unique filenames
if [ -f $PDFCOUNTFILE ] ; then
# write counter to /etc/pdf/pdfcount
# filename for pdf output based on Windows Username and COUNT number
# Send the message first to make it seem faster.
MESSAGE="\\134\134PdfServer\134pdfs\134$OUTPUTFILENAME has been created"
echo -e $MESSAGE | smbclient -M $MACHINENETBIOSNAME -U "PDF SERVER" >
# Finally, make the pdf...
ps2pdf13 $OPTIONS /tmp/$SAMBAUSERNAME $OUTPUTDIR/$OUTPUTFILENAME
# Remove the temporary file written by Samba
---------8<---- end snip -----------
Any helpful guidance would be welcomed,
Thank you for reading
More information about the samba