Hello people. We have an OLD version of Samba linking a Sun running SunOS 4.1.3 with PCs running Windows 95. Both Samba and the OS are to be upgraded in the next couple of months but until that ahppens we have a problem that I would like some advice on. The problem is the list of defined printers in Windows disappears every now and then. It does not happen for all PCs simultaneously, or even for groups of PCs. But when it does happen the only way to get the listing back is to restart Windows 95. Does this strike a familiar note with anyone? Any assistance would be much appreciated. Thanks for your time. Tony H.
> From: "Tony House" <tonyh@menzies.su.edu.au> > Subject: Printers disappearing > > The problem is the list of defined printers in Windows disappears every now > and then. It does not happen for all PCs simultaneously, or even for groups > of PCs. But when it does happen the only way to get the listing back is to > restart Windows 95. > > Does this strike a familiar note with anyone? >Yes. Happens to me sometimes, latest version of Samba on Solaris 2.5.1, athough it has been happening for a long time. Some PC's are more prone to the problem than others, most have never had the problem and it only happens to one machine at the time. I have one machine that is quite prone to this 'disappearing printers' problem that is identical to 20 others that dont have the problem. Ive not seen a pattern. Trying to re-define the printers just gets windows confused. Rebooting fixes it. I usually get called when Eudora crashes in response to a print request, Eudora doesnt take kindly to the default printer disappearing. -- Matthew Geier, matthew@law.usyd.edu.au Computer Systems Manager, +61 2 9351 0240 Law School, University of Sydney +61 2 9351 0200 (fax)
Hi The problem with dissappearing printers is an old one. I made some posting way back when I had struggled with this problem, and solved it. The problem is in printing.c, in the function parse_lpq_entry(). It does return LPSTAT_ERROR in some cases. This makes NT drop the printer, and I guess that is the same thing happening with win95. The quick "fix" is to return LPSTAT_STOPPED instead of LPSTAT_ERROR. I am not quite aware of the meaning of it, though. Can anyone explain this? The problem occurs of the string "error" (and a few others, as I remember) is a part of the lpq output. If you check the ftp address below, you can see my changes to the stat1_strings variable. I can not remember what influence this had, exectly. (I have not had problems for over a year...) I do not believe that those changes ever made it to the source. I have some other changes in the distribution printing.c, but I do not believe that they address this specific problem. IT is only for the "lprng" support. The fix I have been using for the last year or so is this: In smb.conf: lpq command = /dist/bin/lpq.smb -P%p cat /dist/bin/lpq.smb #!/bin/sh /coll/local/bin/lpq $* |\ /bin/egrep -v "error|zero length control file" |\ awk '{print substr($0,1,65)" "substr($0,66)}' |\ sed 's,/var/spool/pcnfs/\([^/]*\)/,/var/spool/pcnfs/\1:,' It is the egrep -v that fixes the dissappearing printers problem. You can see my patch (old!) at ftp://ftp.hum.auc.dk/pub/Magnus_Svavarsson/Samba I hope this can help. /Magnus ---------------------- Magnus Svavarsson Network Administrator Faculty of Humanities Aalborg University