script to mount smb drives over a network

#!/bin/bash

case $1 in
   'start')
      mount -t smbfs -o fmask=777,dmask=777,username=xxx,password=xxx //ip addy/folder /mount location
      ;;
   'stop')
      umount /mount location
      ;;
   *) echo "usage: $0 <start|stop>"
esac

usage: ./script start|stop

this script also works well when using hamachi in linux – just have to change ip addy to the system (hamachi) assigned ip address of the file server to connect to.

«
»

    Leave a Reply

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