[Samba] re. 3.4.9 printing addprinter command reparse doesn't see new printer

Jack Downes jax at nwmt.us
Tue Oct 5 09:51:20 MDT 2010


The behavior is different from the 3.2.5 version I used to use.   I have
server that handles some 504 printers for the hospital serving some 2k
users.  The ratio really isn't that bad, about 150 of those printers are
specialty label printers. 

I moved to the newer Samba because of Windows 7 clients.  Our main IT
admin said 'No' to Vista so I didn't have to worry about this back
then...  Anyway, no i'm upgrading because the samba release notes, and a
lot of the email I read on this list said I should be using 3.4.8 or
better or 3.5.4 or better.  Well, now I'm on 3.4.9. 

That's the history. 

Now, the way i was used to the APW working was that on the windows XP
client, I'd right click, Add Printer, choose my selections, hit finish,
and then the printer would show up.  There were no error messages with
3.2.5, it just worked. 

So, I'm building a testing box, attempting to mimic what I've got in the
3.2.5/linux box with 3.4.9 on freebsd 8 (it's go zfs is why).  Taking
this in steps, I'm still using security = user until I get all or most
of the problems worked out.  I've managed (via google) to remove around
90% of my questions / concerns, and am now down to the "Why doesn't this
work as expected?" one. 

What currently happens:
Right clicking in the windows "Printers & Faxes" folder to engage the
APW works as expected, I'm prompted through several fields to the point
of clicking finish.  After I click Finish, it does appear to work
correctly.  If it needs to load a new driver, it does that, if not
things go a bit quicker.  The progress bar goes all the way to the end
where it pops up a window saying "Unable to add printer. Access Denied"
or something similar.
Now, I KNOW the printer is added, that this is just a superfluous error
message.  I can look at cups, refresh the printers page, and bang, it'll
be there.  And if I click the 'oK' button on the windows error, and then
again click 'Finish'  the Wizard at this point will go away, and my
printer will be there.  The correct driver will be loaded, and it's all
generally okay. 

As an aside, on the things to note:  I put in a request to restart cups
in the smbaddprinter.pl script - after adding the printer.  This with a
sleep of about 3 seconds seems to be the best balance and allows me to
use the double-tap on the Finish button with success - without waiting
forever.  I think that Samba is not re-parsing the printers from CUPS
correctly or CUPS (1.4.4) is not returning an up-to-date list for
whatever reason.

On log level 10 I cannot find what is causing this behavior, however
it's completely repeatable.  This problem is an irritant, but one I can
live with.  it's just that this behavior is different than in 3.2.5.
This is all from memory, I'm not at my desk, and I'm about to get in the
car.  So sorry there are no files included.  I've tried doing that
before, but people have just ignore the messages, so that seems a bad
idea too.

Sorry about hijacking a thread, I didn't know what I did would do so. 
When asking a question, I'll begin a new one from this point on. 

Thanks for taking the time to consider my question.




Gary Dale wrote:
> OK. Perhaps you can be more specific about what you are trying to
> accomplish. I don't recall adding printers to a server as being
> something that happens frequently. yet I get the impression that your
> concern is that you have to wait before the added printer becomes
> available. That doesn't seem like much of a problem.
>
> How long do you have to wait?
>
> Basically, all the smbaddprinter.pl script does is call lpadmin. At
> least on my system, that seems to be a CUPS specific version. I think
> that's probably usual for any system running CUPS. Perhaps you should
> be asking the maintainer(s) for lpadmin?
>
>
>
> On 04/10/10 06:30 PM, Jack Downes wrote:
>> ?  I didn't hijack a thread...  this is a mailing list.  All I did
>> was hit reply list to a random email, cleaned out the messages &
>> subject and started a new thread.  How is that wrong..?
>>
>> I did try your suggestion, and it doesn't do anything but interrupt
>> the operation... and I get an "Operation could not be completed
>> error."  Which makes sense...
>>
>>
>> On 10/ 4/10 04:21 PM, Gary Dale wrote:
>>> Please don't hijack threads.
>>>
>>> You could try something like /etc/init.d/samba restart (or your
>>> local equivalent) to the end of perl script.
>>>
>>>
>>> ------------------------------------------
>>>
>>> hello
>>>
>>> I have cups printing with cups 1.4.4.   I'm using the included
>>> smbaddprinter.pl command to add printers to my server.
>>>
>>> Now, my error is that when I add the printer, I get ACCESS DENIED in
>>> the windows client, but if  I check cups, there the printer is.  And
>>> if I wait a bit with the windows client or reload samba, there the
>>> printer is within the share as well.
>>>
>>> Now, from the man page on smb.conf
>>>
>>> "Once the /|addprinter command|/ has been executed, |smbd| will
>>> reparse the | smb.conf| to determine if the share defined by the APW
>>> exists. If the sharename is still invalid, then |smbd | will return
>>> an ACCESS_DENIED error to the client."
>>>
>>>
>>> So... is there a way for me to ask Samba to wait a few seconds
>>> before reparsing the smb.conf to check for the new printer?  I tried
>>> adding a sleep() to the perl script, but that seems to make the
>>> issue worse, so that's not the choice it seems.
>>>
>>> thanks!
>>
>



More information about the samba mailing list