This construction makes is possible for every user logged in to browse the Windows and/or Samba network, and access shares on all hosts if granted with your Linux host.
To mount the shares on demand autofs and cifs or smbfs are used.
It works on every network, all hosts, domains/workgroups and shares are automatically detected. With this information a representation is build in the homedirectory of every user logged in.
In short, the construction does:
- automatically detects all the smb hosts and their shares (with nbtscan and smbclient)
- creates a directory in the homemap of the users logged in which represents the "windows networkneighbourhood".
- when entering a share, it is automatically mounted (with autofs and cifs and or smbfs)
I've published it on HowtoForge:
It lets you browse the networkneighbourhood, which is detected automatically, no matter where you are, and you can enter the shares whenever you want, if granted. This is done using automount and cifs. The latest is making sure that the properties on files are represented properly and ATTR/ACL's, links and inotify are supported. which is not the case with other solutions I know like the kio slaves and Fusesmb.
Futher this solution is also usable in a NetWare environment (using other utilities to discover the hosts and shares and of course another mountprogram mount.ncpfs).
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.