So, once again I find myself trying to get printers from CUPS to Samba on a debian linux print/file server. I didn't have any luck with cupsaddsmb command last time, but I thought "What the heck, I know a bit more about linux now" and decided to try using it again. (The alternative is to manually add the printers to Samba, and then manually install the drivers in Samba using rpcclient or something).
I was following this somewhat updated guide. I'll just record here the error messages I got when trying to run
cupsaddsmb -v -U root -a
and the corresponding fixes.
First error messages (they typically just keep repeating if you have '-v' on, otherwise it silently fails):
Unable to copy Windows 2000 printer driver files (1)!
Running command: smbclient //localhost/print$ -N -A /tmp/4868f5046ce91 -c 'mkdir W32X86;put /tmp/4868f4ff23c03 W32X86/PUB_Conference_HPLJ5n.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.30]
Server not using user level security and no password supplied.
Server requested LANMAN password (share-level security) but 'client use lanman auth' is disabled
tree connect failed: SUCCESS - 0
client lanman auth = yes
to your smb.conf and restart samba
/etc/init.d/samba restart
One error message down, another one crops up. :-)
Unable to copy Windows 2000 printer driver files (1)!
Running command: smbclient //localhost/print$ -N -A /tmp/4868f64feb286 -c 'mkdir W32X86;put /tmp/4868f64a04e87 W32X86/PUB_Conference_HPLJ5n.ppd;put /usr/share/cups/drivers/ps5ui.dll W32X86/ps5ui.dll;put /usr/share/cups/drivers/pscript.hlp W32X86/pscript.hlp;put /usr/share/cups/drivers/pscript.ntf W32X86/pscript.ntf;put /usr/share/cups/drivers/pscript5.dll W32X86/pscript5.dll'
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.30]
Server not using user level security and no password supplied.
tree connect failed: NT_STATUS_WRONG_PASSWORD
I had a feeling the line about "Server not using user level security and no password supplied" had something to do with it. On a whim, I opened up my /etc/samba/smb.conf again and changed
security = SHARE
to
security = USER
Hooray! That seemed to do the trick. Now the cupsaddsmb command runs to completion for each printer, and states that the drivers are installed for it. Of course, I'll change my security back to SHARE after I'm done installing the browsers. Guess I'll have to switch it to USER and restart samba every time I want to add another printer. Not much of a sacrifice compared to doing it the manual way -- I might switch to user based security if our company expands anyhow.
No comments:
Post a Comment