Mounting windows shares from Linux
Here's a quick shell script I wrote to mount windows shares from Linux. It may be called with the arguments 'mount' or 'umount' to respectively mount and unmount the windows shares.
if [ $# -le "0" ]; then
echo "Usage: mwfs [mount | umount]"
exit 0
fi
case "$1" in
[mM][oO][uU][nN][tT] ) echo "Mounting wfs..."
echo "Please enter password for acmeuser"
stty -echo
read PASS
stty echo
echo "Mounting //acme/users..."
smbmount //acme/users /home/acmeuser/wfs/users -o username=acmeuser,workgroup=acmeindia,password=$PASS
;;
[uU][mM][oO][uU][nN][tT] ) echo "Unmounting wfs..."
echo "Unmounting //acme/users..."
umount /home/acmeuser/wfs/users/
;;
* )
echo "Invalid parameter"
esac
exit 0
Comments:
Post a comment: