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:

http://www.howtoforge.com/automatic_discovery_mounting_smb_networkshares

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).

Stef Bon

homepage url:
http://linux.bononline.nl

download url:
http://www.howtoforge.com/automatic_discovery_mounting_smb_networkshares

(Visited 1 times, 1 visits today)

Category: Free Tools, Technical Solutions
This entry was posted Monday, 24 December, 2007 at 12:10 pm
You can follow any responses to this entry via RSS.

Leave a Reply

Your email address will not be published. Required fields are marked *

No comments yet