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: /mnt/NETWORK/SERVER/ShareName1 /mnt/NETWORK/SERVER/ShareName2 /mnt/NETWORK/SERVER2/Share2-1 ... 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!! Dependencies: You need Samba (version 3 or above needed for CIFS mounts) and PHP 4 or higher. Installation: 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" Usage: Please see output of $ smbsrvmount.php Notes: - If you want to be able to mount/umount shares as unprivileged user, please refer to Samba documentation regarding installing Samba mount helpers "SUID root". - 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 ======== #!/bin/sh # Change this to path where you want servers to be mounted MOUNTPATH=/mnt/net 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 ========= #!/bin/sh MOUNTPATH=/mnt/net echo "Unmounting current mounts...." umount -l -f $MOUNTPATH/*/* echo "Unmounted." ===================================== License: The software is distributed under GNU General Public License, v. 2 or higher (at you option). See GNU-GPL.html for more information.
- 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
smbsrvmount-20050912-0210.tar.bz2 (11 Kb) [5838 d/l]