Hi @all, I have 2 questions about printer driver installation on w2k-client for a samba served printer: 1. If I want to install a driver on w2k workstation, I choose network printer and then can browse the network. If printers are served from a Nt/w2k-server, in my opinion it is not nessesary to double click the netbios name of the Nt/w2k-server to see the shared printers. In this case under the Workgroup-Name are all shared printers of all servers visible like - workgroupname \\server1\printer1 \\server2\printer1 + server1 + server2 If printers served from Samba it is nessesary to double click the netbios name of the samba server to see printershares. Why? 2. If I'm uploading printer drivers for w2k and win9x via the APW (Add Printer Wizzard) from a NT/W2K/XP-client to the Samba server, w2k alway show me, that on the samba server only a driver for w2k exists. Why? tom ________________________________________________________________ Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr! Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 1 Nov 2002, Thomas Bork wrote:> Hi @all, > > I have 2 questions about printer driver installation on w2k-client for a > samba served printer: > > 1. If I want to install a driver on w2k workstation, I choose network > printer and then can browse the network. If printers are served from a > Nt/w2k-server, in my opinion it is not nessesary to double click the > netbios name of the Nt/w2k-server to see the shared printers. In this > case under the Workgroup-Name are all shared printers of all servers > visible like > > - workgroupname > \\server1\printer1 > \\server2\printer1 > + server1 > + server2 > > If printers served from Samba it is nessesary to double click the > netbios name of the samba server to see printershares. Why?Unknown. Tim had looked into this but I don't remember the details.> 2. If I'm uploading printer drivers for w2k and win9x via the APW (Add > Printer Wizzard) from a NT/W2K/XP-client to the Samba server, w2k alway > show me, that on the samba server only a driver for w2k exists. Why?No idea. Need more details. cheers, jerry --------------------------------------------------------------------- Hewlett-Packard ------------------------- http://www.hp.com SAMBA Team ---------------------- http://www.samba.org GnuPG Key ---- http://www.plainjoe.org/gpg_public.asc ISBN 0-672-32269-2 "SAMS Teach Yourself Samba in 24 Hours" 2ed "I never saved anything for the swim back." Ethan Hawk in Gattaca -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE9wpJNIR7qMdg1EfYRAt+1AKCKmNb/xxh0Fe1aRmM7GYCnHi2QsgCgpSpO Qb3aWxifRhRiDwaP8ha/OQY=w2Mb -----END PGP SIGNATURE-----
Thomas Bork wrote:> Hallo Eirik Thorsnes, > > you wrote: > > >>>> Is it correct, that the automatic download of printer drivers is > >>>> only possible for printers, which are associated with an printcap > >>>> entry? When I'm uploading a postscript driver for a *virtuell* > >>>> printer, which is not associated with an printcap entry and then > >>>> making an automatic installation of the driver on w2k, the status > >>>> of this printer is always "Failure". The definition in smb.conf > is: > >> > >> No. Any printer can have drivers associated with it. > [...] > > Of course, but since the lpq command for a virtual printer don't give > > a successfull result - you get an error on the client for the status. > > My solution here was to set a "special" lpq command for the virtual > > printer, which always returned a successful result when asked. > > great! Could you post this to the list? > > > tom >Here is my pdf-virtual-printer: (see also the Mandrake example in the source) smb.conf: --------------- to-pdf] path = /var/spool/samba guest ok = No printable = Yes comment = PDF Generator. Saves PDF to your home on server lpq command = /usr/local/bin/smb-pdfprint status print command = /usr/local/bin/smb-pdfprint %s %u &&\ echo "Please find your new pdf-file in your home-dir on server"\ |smbclient -M %m -I %I -U admin --------------- smb-pdfprint: (relevant part) --------------- if [ "$1" == "status" ]; then echo "Printer: PDF-generator bogus status" echo "Queue: no printable jobs in queue" echo "Server: no server active" echo "Filter_status: done" echo "Rank Owner/ID Class Job Files Size Time" exit 0 fi --------------- (see also attached smb-pdfprint) Eirik -- REAL Programmers never work 9 to 5. If any REAL Programmers are around at 9 AM, it's because they were up all night. -------------- next part -------------- #!/bin/bash if [ "$1" == "status" ]; then echo "Printer: PDF-generator bogus status" echo "Queue: no printable jobs in queue" echo "Server: no server active" echo "Filter_status: done" echo "Rank Owner/ID Class Job Files Size Time" exit 0 fi if [ "x$1" == "x" -o "x$2" == "x" ]; then echo "$0: Not enough arguments." echo "Usage: $0 <filename> <username>" logger "$0: Wrong usage, exiting" exit 1 fi if [ "$2" == "root" -o "$2" == "daemon" -o "$2" == "apache" -o "$2" == "postgres" -o "$2" == "named" -o "$2" == "operator" -o "$2" == "bin" ]; then echo "$0: system accounts not allowed, exiting" logger "$0: system accounts not allowed, exiting" exit 1 fi NEWFILE=`mktemp /var/spool/samba/pdfprint-${2}-XXXXXX` if [ $? -ne 0 ]; then echo "$0: Can't create temp file, exiting..." logger "$0: Can't create temp file, exiting." exit 1 fi ps2pdf13 -dAutoFilterColorImages=false -sColorImageFilter=FlateEncode $1 $NEWFILE if [ -e $NEWFILE ]; then MYHOME=`grep $2 /etc/passwd |awk -F: '{ print $6 }' - ` MOVEDFILE="$MYHOME/$(basename $NEWFILE).pdf" if [ -r $NEWFILE ]; then mv $NEWFILE $MOVEDFILE fi if [ $? -ne 0 ]; then echo "$0: Can't move temp file $NEWFILE to $MOVEDFILE, exiting..." logger "$0: Can't move temp file $NEWFILE to $MOVEDFILE, exiting." rm -f $NEWFILE exit 1 fi fi
Hallo Eirik Thorsnes, you wrote:>> lpq command = /usr/local/bin/smb-pdfprint status[...]>> if [ "$1" == "status" ]; then >> echo "Printer: PDF-generator bogus status" >> echo "Queue: no printable jobs in queue" >> echo "Server: no server active" >> echo "Filter_status: done" >> echo "Rank Owner/ID Class Job Files Size Time" >> exit 0 >> fi >> --------------- >> (see also attached smb-pdfprint)thanks a lot :o) Is there a special documentation for Mandrake in the source? I downloaded the source for 2.2.6 from www.samba.org and cannot find anything like this. tom
Thomas Bork wrote:> Hallo Eirik Thorsnes, > > you wrote: > > >> lpq command = /usr/local/bin/smb-pdfprint status > [...] > >> if [ "$1" == "status" ]; then > >> echo "Printer: PDF-generator bogus status" > >> echo "Queue: no printable jobs in queue" > >> echo "Server: no server active" > >> echo "Filter_status: done" > >> echo "Rank Owner/ID Class Job Files Size Time" > >> exit 0 > >> fi > >> --------------- > >> (see also attached smb-pdfprint) > > thanks a lot :o) > Is there a special documentation for Mandrake in the source? I > downloaded the source for 2.2.6 from www.samba.org and cannot find > anything like this. > > > tom >It may be that it is only in latest CVS. It is in packaging/Mandrake directory. Anyway, here is relevant smb.conf: --------- [pdf-generator] path = /var/tmp guest ok = No printable = Yes comment = PDF Generator (only valid users) #print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP & print command = /usr/share/samba/scripts/print-pdf %s ~%u \\\\\\\\%L\\\\%u %m %I & ---------- (the print command lines should be one line) Attached Mandrake print-pdf script. Eirik -- REAL Programmers never work 9 to 5. If any REAL Programmers are around at 9 AM, it's because they were up all night. -------------- next part -------------- A non-text attachment was scrubbed... Name: samba-print-pdf.sh Type: application/x-sh Size: 1703 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20021111/365a6098/samba-print-pdf.sh