[Samba] Question about command line tools.

Tomasz Kobiela - Amazis.net tomasz.kobiela at amazis.com
Thu Sep 17 06:58:56 MDT 2009

I have searched net for this information and I could find solution for 
my problems.
I'm writing a perl script which searches local network for computers 
with windows shares.
I have done this by executing  nmblookup -M -- -
 From this command I get a list of  computer (by ip) with MSBROWSE.
Then I'm using smbclient command to get shares from every ip.
I have one problem to solve.
How I can check if share needs password and user ?
Which command tool use to examine if shares need authentication.
Now I use mount option with user=% it works for servers without password.
If mount is not successful I read error and prompt for password.
But this is ugly solution. I have one server which can be mounted with 
user=% but mounted shares are avaliable only for root user.
If I mount it with user and password everything works.
Maybe this is silly question but I can't find command tool for checking 
if password is needed.
Thank in advance.

Pozdrawiam/Kind regards

Tomasz Kobiela

More information about the samba mailing list