*- On  9 Nov, H. Peter Anvin wrote about "Re: Network Neighborhood"
> Anders Melchiorsen wrote:
>> 
>> Hi, I have just subscribed to this list but I post straight away since
>> I am in a bit of a hurry - and I was unable to find a mail archive to
>> get up to speed on the list. Sorry if I am an annoyance :).
>> 
>> I have to find a medium-sized project (that is, half time work for a
>> couple of months) to do in University. I want to do something that I
>> can benefit from personally, and so I thought about an automounter for
>> Windows shares. (I live in a dorm with lots of Windows machines
>> sharing things through SMB).
>> 
>> As far as I can tell, autofs does support smbmount, but only on a per
>> share basis; you need to specify a mount rule for each share on each
>> server. What I want is dynamic browsing capabilities like Windows
>> offers.
>> 
>> I think the main problem is that the virtual file system needs two
>> levels, the first with the servers and the second with shares on each
>> server.
>> 
>> Is autofs able to do this, perhaps with a few scripts hacked together?
>> Would it be hard to expand autofs in this direction? Is there some
>> reason it cannot be done? If it is not currently possible in autofs,
>> would one be able to do it with amd (I understand that amd is a bit
>> more powerful, at the cost of being vastly more complex)?
>> 
> 
> It should be doable by using an autofs nested mount on the first level
> and a program mount on the second level.  Shouldn't be too difficult.
> 

In the program mounts you can use:

nmblookup -T -d 2 '*'

to get a list of all pc's broadcasting on your subnet. Then for each
active pc you can use 

smbclient -L <pcname> -N

to get a list of the available shares.  These lists will of course all
need to be post processed to get in a machine usable form.

The last big hurdle is getting autofs to work with the half dozen or so
different command syntaxes of smbmount out there.

Have fun, it sounds like a fun project.
-- 
Brian Servis
-- 
------------------------------------------------------------------------
Mechanical Engineering              |  Never criticize anybody until you  
Purdue University                   |  have walked a mile in their shoes,
[EMAIL PROTECTED]                   |  because by that time you will be a
http://www.ecn.purdue.edu/~servis   |  mile away and have their shoes.

Reply via email to