Samba Server Mounter Project Homepage


Samba Server Mounter is a program which allows you to mount and umount whole
servers and even networks using single command. It supports SMB and CIFS
shares. The shares are mounted into a tree-like directory structure like:

And so on.

The program uses smbclient to find shares and additional servers on the network.
For instance:
$ smbsrvmount.php --netremount /mnt/NETWORK MAINSERVER
- will attempt to mount all shares of MAINSERVER and all shares of all servers
MAINSERVER reports under /mnt/NETWORK. Only directory /mnt/NETWORK must exist
before this operation, all subdirectories are created automatically and
automatically removed if share mounting failed or when smbsrvmount.php .

NOTE: Password-protected shares are not supported yet!!

 You need Samba (version 3 or above needed for CIFS mounts) and PHP 4 or higher.

 1) Review top of smbsrvmount.php and modify options according to your taste.
 2) Copy smbsrvmount.php to a location you wish. To install the application
    to /usr/local/bin and change file permissions properly, type:
    $ su -c " make install"

 Please see output of
 $ smbsrvmount.php

 - If you want to be able to mount/umount shares as unprivileged user, please
   refer to Samba documentation regarding installing Samba mount helpers "SUID

 - You can use multiple calls to smbsrvmount.php with the same network mounting
   path, e.g.:
     smbsrvmount.php --srvremount /mnt/NETWORK JOHN IVAN MAYA
     smbsrvmount.php --netremount /mnt/NETWORK MOVIESERVER
     smbsrvmount.php --netremount /mnt/NETWORK FILESERVER
   Running these commands subsequently will not cause the latter commands to
   unmount shares mounted by the earlier commands.

 - Always use "remount" options to mount :)

 - Use of CIFS is strongly recommended unless you need to mount shares from
   Windows 95/98 computers or Samba older than 3.0.

 - While the program doesn't support config files and you can't customize
   mounting of shares there, you can simply rename it, modify mount options
   in the file and install another copy.

 - Sample shell scripts using smbsrvmount.php:

   =========  MOUNT_NETWORK.SH ========

   # Change this to path where you want servers to be mounted

   echo "Unmounting current mounts...."
   umount -l -f $MOUNTPATH/*/*
   echo "Unmounted."

   /usr/local/bin/smbsrvmount.php --srvremount $MOUNTPATH STORE MOVIES MUSIC SERGEY JULIA
   /usr/local/bin/smbsrvmount.php --netremount $MOUNTPATH COMPANYSERVER

   ========= UMOUNT_NETWORK.SH =========

   echo "Unmounting current mounts...."
   umount -l -f $MOUNTPATH/*/*
   echo "Unmounted."


 The software is distributed under GNU General Public License, v. 2 or higher
 (at you option). See GNU-GPL.html for more information.

To Do / History

- Add configuration file support to be able to configure mount options
  per server/share (support password-protected shares and so on),
- Lookup server name by IP
- Ping servers before connecting
- Find servers by pinging network
 * 12/09/2005 v0.4
   + Release :)
 * 08/11/2004 v0.3
   + Added CIFS support

Download smbsrvmount

Get smbsrvmount-20050912-0210.tar.bz2 smbsrvmount-20050912-0210.tar.bz2 (11 Kb) [6176 d/l]

Go to Start page
© Sergey A. Galin, 1998-2022
Time: 0.013s · qclam: 65543/68007 Total: 2556455/2836399