[Samba] Automating cupsaddsmb or some alternative

Kurt Pfeifle kpfeifle at danka.de
Wed Apr 9 18:50:58 GMT 2003

Gerald (Jerry) Carter jerry at samba.org wrote on Samba-Digest:

> Wed Apr 9 10:32:06 GMT 2003
> On Mon, 7 Apr 2003, Corey McGuire wrote:
>> I am developing a print server for a client,

Do you need remote administration? Web-based adding of new printers? Or what are
the requirements?

>> and I need to make the ability
>> to add and configure print servers as simple as possible.  So far, cups and
>> samba are top notch, but there are two problems I have.
>> One, I need to restart the samba service every time I add a printer.
> A solution to this has been suggested.  We need to implement a printcap 
> cache time and reload printers periodically when "printing = cups"
> I just haven't had time to do it.
>> Two, I need to log in via console or SSH to run cupsaddsmb,

 From where do you log in? From Unix or from Windows?

>> and I need to
>> then authenticate.

Isn't this what you *want*? Anyway, you can probably avoid the typing of
the password by using a "-U username:password" notation in the cupsaddsmb

> There are several ways to automate  smbclient and rpcclient 
> (which cupsmbadd uses IIRC).  I didn't think it had to be local.  
> If so, the would be a cupsmbadd issue since [smb|rpc]client has no 
> problems installing drivers on remote servers.

You can use "cupsaddsmb" remotely, no problem:

    user at localhost:/> cupsaddsmb -H sambaserver -U sambauser -h cupsserver -v printername

On localhost you just need to have CUPS and Samba client sides installed
(cupsaddsmb, smbclient, rpcclient...).

On sambaserver you need to have Samba installed (compiled against libcups).

On cupsserver you need to have CUPS installed (and, of course, the printer
"printername", plus the [Adobe or CUPS] PostScript Driver files as recommended
by "man cupsaddsmb").

I'll probably demonstrate it on the SambaXP conference...

Of course, sambaserver and cupsserver may be the same host.

> cheers, jerry


More information about the samba mailing list