Windows to Linux CIFS Shares

ref: https://wiki.ubuntu.com/MountWindowsSharesPermanently

on windows side:

right click on the drive or folder, properties, then sharing

click the advanced sharing button, check share this folder

name the share

click permissions, and add the user you want to access the share. this can be the current windows users, or a new user you make specifically for sharing to linux

on the linux box:

install CIFS :

sudo apt-get install cifs-utils

make a directory to mount the windows share to:

mkdir /mnt/winshare

store the windows user credentials in a hdiden file:

nano ~/.smbcredentials
username=windowshareusername
password=windowssharepassword

control x to exit, y to save.

as always, backup your fstab:

cp /etc/fstab /etc/fstab.bak

add the windows share to the fstab and test:

 nano /etc/fstab
//windowshost/windowsfoldertoshare /mnt/winshare cifs credentials=/home/linuxsuername/.smbcredentials  0  0

control x to exit, y to save.

test the mount:

mount -a

if you get an error, check syntax and permissions. if not, check for the folder in your /mnt/winshare/. reboot, see if it mounts automatically.

Discussion

Enter your comment. Wiki syntax is allowed:
 
Last modified: le 2022/02/28 18:27