[Samba] Printer listings

Tom Van Deun tomvdeun at gmail.com
Mon Dec 22 12:13:07 GMT 2008


Ah, yes. My mistake. I should have been more specific about that of course.

First of all thank you L.P.H. van Belle for your quick reply.

The thing is, I can't actually install the smbclient on the system I need to
list the printers on.

It would be too big for what it needs to do.

All I need is a small app that lists printers on a remote windows system
(usually windows 2000 but it can differ). So I would need to pass the app
(or script, doesn't matter) the hostname as a variable. and grep the
printers from the output (or, if the app only returns the printers just take
the output).

Which is why I'm looking for a small app or script that does that. Or a
library that gives me that functionality.

I hope that makes things more clear. If there are any question feel free to
ask.

Kind regards,

Tom

On Mon, Dec 22, 2008 at 1:01 PM, L.P.H. van Belle <belle at bazuin.nl> wrote:

for x in $( cat ipnummers.txt ); do smbclient -L $x  >> shares.txt ; done

should do it,
you make a txt file which has all the ipnummers in it.
and



-----Oorspronkelijk bericht-----
Van: samba-bounces+belle=bazuin.nl at lists.samba.org
[mailto:samba-bounces+belle <samba-bounces%2Bbelle>=bazuin.nl@
lists.samba.org] Namens Tom Van Deun
Verzonden: 2008-12-22 12:52
Aan: samba at lists.samba.org
Onderwerp: [Samba] Printer listing

Hi all

I'm very new to mailing lists so please forgive me any mistakes.

I am looking for a program or library that I can use on Unix to list
printers on Windows machines. I can program and I understand a fair bit of
C. But when I started taking apart the smbclient to get the "smbclient -L
<host>" functionality out of it it looked like a lot of work. A whole lot of
work.

So I'm hoping to avoid that. Also because I've been reading up on netbios,
nbt, smb and cifs and it seems to be a real mess.

Is there a tool / program / library out there that can give me the same
functionality of "smbclient -L <host>" ? I really only need to list the
shares, nothing more.


Kind regards,

Tom
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


More information about the samba mailing list