Create a share on your Windows machine (the remote share)
sudo apt-get install cifs-utils
- Update the unmount order to prevent CIFS from hanging during shutdown.
sudo update-rc.d -f umountnfs.sh remove sudo update-rc.d umountnfs.sh stop 15 0 6 .
- Switch to the user that will have permissions over the local share; find out the UID of the user (
grep $USER /etc/passwd | cut -d: -f3
- Create a Samba credentials file,
/home/$USER/.smbcredentials, and make it only user-readable (
chmod og-rw ~/.smbcredentials)
username=MyUsername password=MyPassword # OR: # username=MyUsername@MyDomain # password=MyPassword # OR: (for cifs on Windows Serve 2003) # username=MyDomain/MyUsername # password=MyPassword
- Create a new empty directory by the Linux user which will hold the client folder:
- Very carefully edit
/etc/fstab, making sure that it is on one line:
//$SERVER_NAME/$SERVER_PATH /home/$USER/mount cifs iocharset=utf8,credentials=/path/to/.smbcredentials,uid=1000 0 0
//10.0.2.2/newsroom /home/jevon/newsroom cifs iocharset=utf8,credentials=/home/jevon/.smbcredentials,uid=1000 0 0
- Restart mount and hopefully everything will work!
sudo mount -a ls -la /home/$USER/mount