Alexander Skwar
2004-May-05 10:58 UTC
[Samba] Printproblems in 3.0.3 - Postscript files contain log messages
Hello! I'm having a problem with Samba 3.0.3 on a HP-UX 11.00 server. In Samba, I'm having a printer which allows me to create PDF files. For this, I added the following lines to smb.conf: [global] load printers = No printcap name = /etc/opt/samba/printcap [printers] comment = Defaults for all printers path = /var/opt/samba/spool read only = Yes create mask = 0700 printable = Yes browseable = No nt acl support = Yes [pdf-generator] comment = PDF Generator (only valid users) path = /var/opt/samba/spool/pdf-generator printable = Yes print command = /var/opt/samba/bin/print-pdf %s ~%u/public_html/pdf-prints http://%L/~%u/pdf-prints %m %I %u "%J" & nt acl support = Yes (The script /var/opt/samba/bin/print-pdf can be found at the end of this message.) The problem that I'm having, is that this printer doesn't work since I updated to Samba 3.0.3 (before, I used HP CIFS 2.2.8a; the printer worked). I suppose the reason that it doesn't work is, that the printerfiles/postscript files that Samba creates, contain log messages like this: [...] [2004/05/05 11:43:08, 3] rpc_server/srv_pipe_hnd.c:free_pipe_context(544) free_pipe_context: destroying talloc pool of size 600 [2004/05/05 11:43:08, 3] smbd/process.c:process_smb(890) Transaction 1907 of length 3804 [...] Furhter on in the file I can find parts which look pretty much like Postscript: [...] [2004/05/05 11:43:08, 3] rpc_server/srv_pipe.c:api_rpcTNP(1509) api_rpcTNP: rpc command: SPOOLSS_WRITEPRINTER 716 562 L 689 654 L 691 653 L 718 561 L cp 0.801 0.535 0.113 r [...] "Sadly", this error doesn't come up all the time - just mostly. I also do not know how to "force" this error to come up. Q: Why is it, that I'm having these log messages in the printer files? Thanks a lot, Alexander ############################################################################################### $ cat /var/opt/samba/bin/print-pdf #!/usr/local/bin/bash PS2PDF=ps2pdf13 OPTIONS="-dAutoFilterColorImages=false -sColorImageFilter=FlateEncode" INPUT=$1 PREFIX="$2" #WINBASE=$(echo "$3"|sed -e 's,/,\\\\,g') HTTPBASE="$3" MACHINE=$4 IP=$5 USERNAME=$6 NAME=`echo "$7"|tr '[:punct:]' '[-*]'` CONFFILE=/etc/opt/samba/print-pdf.conf [ -e $CONFFILE ] && . $CONFFILE #Values not taken as arguments, could be set via env. vars (?) or config file KEEP_PS=${KEEP_PS=0} PERMS=${PERMS=640} BASEFILE=${BASEFILE=pdf-service} TEMP="${TEMP=$2}" UMASK=${UMASK=006} mkdir -p "$PREFIX" INFILE=$(basename $INPUT) umask $UMASK [ -n "$NAME" ] && TEMP="$PREFIX" OUTPUT=`mktemp -d $TEMP -p $BASEFILE-XXXXXX` if [ -n "$NAME" ]; then FINALOUTPUT="$PREFIX/$NAME" else FINALOUTPUT="$OUTPUT" fi if [ -n "$8" ]; then OPTIONS="$OPTIONS -dPDFSETTINGS=/${8#pdf-}" else OPTIONS="$OPTIONS -dPDFSETTINGS=/default" fi $PS2PDF $OPTIONS "$INPUT" "$OUTPUT.pdf" mv -f "${OUTPUT}.pdf" "${FINALOUTPUT}".pdf MESSAGE=$(echo "Your PDF file has been created at $HTTPBASE/.") # Cleanup if [ $KEEP_PS != 0 ];then mv -f $INPUT "${FINALOUTPUT}".ps MESSAGE=$(echo "$MESSAGE\nYou can find the postscript file there as well.") chmod $PERMS "${FINALOUTPUT}".ps "${FINALOUTPUT}".pdf else rm -f $INPUT chmod $PERMS "${FINALOUTPUT}".pdf fi rm -f $OUTPUT EMAIL=`ypmatch $USERNAME passwd | awk -F: '{ print $5 }' | sed 's|.*,||'` cat - <<EOMAIL | mutt -e 'set from=cifs-srvr1@_____________ realname="PDF Print Service"' -s "PDF for job $NAME created at `date`" -a "${FINALOUTPUT}".pdf -a "${FINALOUTPUT}".ps $EMAIL >> $dbg 2>&1 Hello. Please find attached your PDF printout of the job named "$NAME", which you submitted at `date` from host $MACHINE. For the next 24 hours, you can also get the files at your pdf-print directory at $HTTPBASE/. Regards, Your PDF Print Service EOMAIL MESSAGE=$(echo "$MESSAGE\n\nThe files have also been mailed to $EMAIL.") echo -e $MESSAGE | /opt/samba/bin/smbclient -M $MACHINE -I $IP -U "PDF Generator" >> $dbg 2>&1 ############################################################################################### Alexander Skwar -- Bei den Vegetariern hei?t der Beischlaf "Best?ubung".
Gerald (Jerry) Carter
2004-May-05 13:33 UTC
[Samba] Printproblems in 3.0.3 - Postscript files contain log messages
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alexander Skwar wrote: | The problem that I'm having, is that this printer | doesn't work since I updated to Samba 3.0.3 (before, I used | HP CIFS 2.2.8a; the printer worked). I suppose the reason that | it doesn't work is, that the printerfiles/postscript files | that Samba creates, contain log messages like this: | | [...] | [2004/05/05 11:43:08, 3] rpc_server/srv_pipe_hnd.c:free_pipe_context(544) | free_pipe_context: destroying talloc pool of size 600 | [2004/05/05 11:43:08, 3] smbd/process.c:process_smb(890) | Transaction 1907 of length 3804 | [...] | | Furhter on in the file I can find parts which look pretty much like | Postscript: | | [...] | [2004/05/05 11:43:08, 3] rpc_server/srv_pipe.c:api_rpcTNP(1509) | api_rpcTNP: rpc command: SPOOLSS_WRITEPRINTER | 716 562 L | 689 654 L | 691 653 L | 718 561 L | cp | 0.801 0.535 0.113 r | [...] | | "Sadly", this error doesn't come up all the time - just | mostly. I also do not know how to "force" this error to | come up. | | Q: Why is it, that I'm having these log messages in | the printer files? Can you send me one of the pdf files with these log entries in them ? cheers, jerry - ---------------------------------------------------------------------- Hewlett-Packard ------------------------- http://www.hp.com SAMBA Team ---------------------- http://www.samba.org GnuPG Key ---- http://www.plainjoe.org/gpg_public.asc "...a hundred billion castaways looking for a home." ----------- Sting -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFAmOzlIR7qMdg1EfYRAnkfAKCe7faCUqy5nd+QEOw1zO0679RnxACg8BSF po1d1sUTvKDkM3ifuWj++kA=JtWF -----END PGP SIGNATURE-----
Possibly Parallel Threads
- not enough charcters available in %J or confusing blanks?
- Column of numbers added to dataframe when saving with read.csv
- <myprinter>.tdb spoilt, tdbbackup -v does not see corrupt data
- RH9, Samba 2.2.8a and printing with CUPS
- Error message: " The following object(s) are masked"