Changes

Example of cfis fstab

2,049 bytes added, 22 May
The following lines were added (+) and removed (-):
==== fstab example: persistent mounts using exposed credentials ====  //apollo/public/ /mnt/public cifs username=nicolep,password=mythtv,iocharset=utf8,sec=ntlm  0  0  //apollo/public/ /mnt/public cifs username=nicolep,password=yourpass,iocharset=utf8,sec=ntlm  0  0  //apollo/media/ /mnt/media cifs username=nicolep,password=mythtv,iocharset=utf8,sec=ntlm  0  0  //apollo/media/ /mnt/media cifs username=nicolep,password=yourpass,iocharset=utf8,sec=ntlm  0  0  //apollo/video/ /mnt/video cifs username=nicolep,password=mythtv,iocharset=utf8,sec=ntlm  0  0  //apollo/video/ /mnt/video cifs username=nicolep,password=yourpass,iocharset=utf8,sec=ntlm  0  0* This provides read-only access to the network shares.Example with file permission specified and full rw access //apollo/public /mnt/public cifs defaults,dir_mode=0777,file_mode=0777,domain=workgroup,username=nicolep,password=yourpass,uid=1000==== troubleshooting: devs keep breaking samba ===='''KERNEL CHANGE BREAKS CIFS.'''Somewhere between kernel 4.10.0-38 4.15.0-20 a change was made that COULD PREVENT your cifs shares from mounting.  Kernels at and before 4.10 used SMB (Server Message Block) version 1.0 as the default if not specified.  Most folks did not specify it so it defaulted to 1.0 and worked.  Microsoft ditched 1.0 in Windows 10 and dropped support.  Linux kernel developers decided to change the kernel code to no longer default to SMB 1.0 and now default to a newer version.  For people that are using legacy networks or NAS devices, it breaks the mounting example from above.  Solution:  Specify the SMB version.  The solution is to tell mount.cifs to use the SMB2, SMB2.1 or SMB3.0 protocol using the "vers" parameter.  in [[Linux CIFS Utils and Samba]] Specify 1.0, 2.0, 2.1, or 3.0.For the following full line example a linux desktop is connecting to an older NAS device.  It is necessary to specify SMB version 1.0.  Example: //apollo/video/ /mnt/video cifs defaults,vers=1.0,domain=workgroup,username=nicolep,password=mythtv,iocharset=utf8,sec=ntlm 0 0'''FAILED TO CLOSE BROKEN PIPE'''Update 2024 Kernel 5.15 Samba 2:4.15.13+dfsg-0ubuntu1.6 - cp: failed to close 'filename': Broken pipeA problem with this latest at the time samba [https://askubuntu.com/questions/1033346/cant-copy-large-files-to-windows-share-error-closing-file-input-output-error/1095334 Can't copy large files to Windows share - Error closing file: Input/output error] issue workaround, specify prior version of cifs on fstab, see example: //apollo/video/ /mnt/video cifs vers=2.0,defaults,domain=workgroup,username=nicolep,password=yourpass,uid=1000
Administrator
663
edits