VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Using fusesmb to mount Windows shares  (Read 10141 times)

toothandnail

  • Tester
  • Vectorian
  • ****
  • Posts: 2527
Using fusesmb to mount Windows shares
« on: May 05, 2008, 12:00:39 pm »

Fusesmb has just gone into the testing repo for 5.9:

http://www.vectorlinux.com/forum2/index.php?topic=6173.0

Fusesmb provides a simple way of handling multiple Samba shares with minimal effort. It allows a user to configure multiple shares from a single mount point, without having to mount individual shares.

The fuse daemon must be running in order to use fusesmb. It can be activated through VasmCC > Service > Graphical Interface Desktop > fuse: fuse daemon.

In order to use Fusesmb, create a ~/.smb directory to hold configuration files. Then create a mount point (for example ~/smbmount). Once that is done, it is necessary to create a configuration file to set the correct fusesmb options. That file should be created in ~/.smb. For a complete list of options, see fusesmb.conf(5). A sample of a working ~/.smb/fusesmb.conf is below:

Code: [Select]
#global options
[global]
; List hidden shares
showhiddenshares=false
; General username
username=<someusername>
; General password
password=<somepassword>
; Connection timeout in seconds
timeout=10
;Interval for updating new shares in minutes
interval=10

If you have a single username/password for a network, the options listed above may be sufficient. However, it is also possible to set options specific to an individual server within a network. As below:

Code: [Select]
; Servers/Share specific settings
[/BOX1]
username=<some-other-username>
password=<some-other-password>
showhiddenshares=true
ignore=false

; Servers/Share specific settings
[/T-42]
username=<yet-another-username>
password=<yet-another-password>
showhiddenshares=true
ignore=true

In the case of the server T-42, since it is a laptop and frequently not on the network, I have set it to ignore so that under normal circumstances no attempt will be made to mount its shares.

Once the preperations have been made, issue the following command:

Code: [Select]
fusesmb ~/smbmount
This will mount the network under ~/smbmount, and scan for available shares. In the instance illustrated, a tree of available shares is produced. As below:

Code: [Select]
.
`-- IBMPEERS
    `-- BOX1
        |-- DDRIVE
        |   |-- Applications
        |   |   |-- ACROBAT
        |   |   |   |-- ar500enu.exe
        |   |   |   `-- pdfrd.zip
        |   |   |-- AdventNet_ManageEngine_OpManager_5_Lin.bin
        |   |   |-- AdventNet_ManageEngine_OpManager_5_Win.exe
        |   |   |-- Autorun.zip
        |   |   |-- DIAGS
        |   |   |   |-- 48LbaChk.exe
        |   |   |   |-- Dial-a-fix-full.exe
        |   |   |   |-- UDPixel.zip
        |   |   |   |-- aida16en_212.zip
        |   |   |   |-- aida32ee_393.exe
        |   |   |   |-- bassam.zip
        |   |   |   |-- bwz-rel.exe
        |   |   |   |-- configus.zip
        |   |   |   |-- dft32_v403_b00.exe
        |   |   |   |-- dft32_v405_b00.iso
        |   |   |   |-- dft32_v407_b00.iso
        |   |   |   |-- everesthome220.exe
        |   |   |   |-- fjdt6_01.zip
        |   |   |   |-- ftool_200_install.IMG
        |   |   |   |-- leaktest.exe
        |   |   |   |-- memt32.zip
        |   |   |   |-- pcw2004_v161.exe
<huge snip.........................................>
        `-- HDRIVE
            |-- image.raw
            |-- iso
            |   |-- READDIFF.TXT
            |   |-- ecs20rc1_en_cd1.zip
            |   |-- ecs20rc2_cd1_en.iso
            |   |-- ecs20rc2_cd1_en.md5
            |   |-- ecs20rc2_cd1_en.zip
            |   |-- ecs20rc3_cd1_en.iso
            |   |-- ecs20rc3_cd1_en.md5
            |   |-- ecs20rc3_cd1_en.zip
            |   |-- ecs20rc3_en_cd1-rc4.diff
            |   |-- ecs20rc3_en_cd1-rc4.md5
            |   |-- ecs20rc3_en_cd1-rc4.zip
            |   |-- ecs20rc4_cd1_en.iso
            |   `-- ecs20rc4_cd1_en.md5
            |-- mkihelp.txt
            `-- w4back
                |-- ASPIROUT.SYS
                |-- AUTOEXEC.BAT
                |-- SYM8XX.ADD
                |-- config.sys
                |-- config.up
                |-- ecs12mr060627.zip
                |-- setup.cmd
                `-- startup.cmd

1489 directories, 26723 files

As can be seen, this mounts all available SMB network shares from a single point. My 'workgroup' name is IBMPEERS, which is listed as the top branch in the tree. Below that, individual machines (BOX1, for example) are listed, then shared partitions, directories and files. Much simpler than individually mounting network shares...

In order to stop the share, a different command is used:

Code: [Select]
fusermount -u smbmount
This will detach the shares and remove the directory tree under ~/smbmount.

Try it, I think you'll find it makes handling Windows shares a lot simpler...

paul.
Logged