August 6th, 2009howto: mount a windows share in ubuntu server
i need to backup my zimbra server at work to our windows server for nightly backups. to do so, i followed this thread at ubuntu forums which tells you to do the following:
install the smbfs package installed:
sudo apt-get install smbfs
then create the mount point:
sudo mkdir /mnt/winshare
then we add the following line to the /etc/fstab file (changing //winserver/share to suite your setup):
//winserver/share /mnt/winshare cifs exec,credentials=/etc/cifspw 0 0
now create the password file we referenced in fstab and add the following text (substituting user and pass for the Windows credentials you’re using):
username=user
password=pass
then just set the permissions on the password file and mount the share:
sudo chmod 600 /etc/cifspw
sudo mount -a
you should be all done
you can now use any method you wish (cp, rsync etc) to copy files from the local machine to the windows share which you’ll now find at /mnt/winshare