lpadmin - password option

angelb at bugarin.us angelb at bugarin.us
Tue Aug 9 08:36:29 PDT 2005

> >>>Also, wouldn't it be nice to be able to specify multiple servers for
> >>>the lpadmin? Just a thought... :)
> >
> >
> >>You can already do that...
> >
> >
> > How? Here's the manpage for lpadmin:
> >
> >   lpadmin [ -E ] [ -h server ] -p printer option(s)
> Right, that's the "official" documentation, but the current
> implementation allows multiple -h options.
> > I tried using the following variations:
> >     -h server1 -h server2   # it only picks the second server listed
> >     -h server1, server2     # doesn't work
> >     -h serever1 server2     # doesn't work
> >
> > What's the correct way to specify multiple servers for lpadmin?

> lpadmin -h server1 -p printer1 option(s) -h server2 -p printer2 option(s)

> Basically, only one server is actively selected at any time.

I tried using the lpadmin specifying two -h and options but it appears to hung while it's asking for the password:

/usr/sbin/lpadmin -h server1 -p y_abbb -D "test" -E -v socket:// - m postscript.pps -h server2 -p y_abbb -  "test" -E -v socket:// -m postscript.pps
Password for xxxx on server1?    <--- hit Enter and does nothing

Just to see I have access to the servers, the following command
was executed successfully after I entered my password:

/usr/sbin/lpadmin -h server1 -p y_abtest -D "test only"

Now, using the same command above but expanded to add a second server, it appears to be hung again. When I hit Enter, it does nothing:
/usr/sbin/lpadmin -h server1 -p y_abtest -D "testing printer" -h server2 -p y_abtest -D "testing printer"
Password for xxxx on server1?

Not a big deal if this doesn't work. I have a script that use two command lines instead of one. The reason why I would like to have one CLI for both servers was to "eliminate" having to enter two passwords(one for each server)...but it doesn't work that way. Each server is independent of each other and so seperate password is required.

Can't wait for a three-tiered CUPS environment where a database server is implemented for the backend...this will eliminate admin redudancy in a multi CUPS server environment... :)

More information about the cups mailing list