[Samba] What steps to take

Gary Dale garydale at rogers.com
Wed Jan 7 11:27:38 GMT 2009


Tom Van Deun wrote:
> Hi list
>
> I'm attempting to list windows shared printers in Unix. That's really all
> that I need and I can't install Samba on the machine I need to list the
> shared printers from. I started analyzing the smbclient code hoping to
> extract the necessary info but as you all know it's a daunting task.
> Certainly for a C novice.
>
> Which is why I want to ask if there is anyone out there who can help me. Be
> it suppling me the entire or partial code, provide some detailed steps I
> should follow so I can figure it out myself or just clues. Anything really,
> I'll filter it.
>
> Extra info:
> I relaly just need to list the printers shared on Windows 2000 systems (as
> far as I know). I don't need authentication or anything. It should work more
> or less like "smbclient -L <remote system>" but it doesn't have to list the
> shared drives. No problem if it does though. (and no, I can't simply use
> smbclient =/)
>
> Kind regards,
>
> Tom
>   
Why not use smbclient if all you want is the list? Pipe the output 
through your favourite tool tool to remove the extra lines you don't want...

However, there are other tools around that also give you a list of 
Windows (and other) printers. Have you looked at them? I don't think 
there is an "easy" way to get through the morass of SMB code for this.


More information about the samba mailing list