Ubuntu: Missing folders in windows network share mounted using samba



Question:

I'm a new ubuntu user and i'm having big trouble mounting a windows network share using samba and cifs.

I installed cifs-utils then mounted using:

mount -t cifs -o username=user,password=**** //WIN_PC/WIN_SHARE/ /mnt/samba/WIN_SHARE  

This seems to work nicely, with the exception that some folders do not appear at the mount point. Also the root user cannot see them, which makes me think it has nothing to do with chown etc. I did chown -R user:user on the mount point.

Now the funny thing is: If i don't mount the network share and instead open it as smb://WIN_PC/WIN_SHARE/ by just clicking through the network using the file browser, then I can see the entire content without problems. (I still have to enter credentials first, and i am using the same credentials.)

So I don't think this has something to do with the windows share config but with the samba config on my ubuntu machine.

Could anyone please help me? I already tried a lot of things and getting very frustrated. Sorry if I am too stupid ;)

Thanks for all help in advance!


Solution:1

This is a long shot because I do not know what version of the kernel you are using but change your mount command or any of the other ones offered here to include the option vers=1.0

For example:

mount -t cifs -o username=user,password=****,vers=1.0 //WIN_PC/WIN_SHARE/ /mnt/samba/WIN_SHARE  

There is a bug report that describes your situation: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1572132

The reason why nautilus / gvfs works is because by default the samba client uses smb1 ( the equivalent of vers=1.0 ) whereas cifs since Linux kernel 4.13 uses smb3 by default.

EDIT: I should note that with Ubuntu 18.04 the samba client / nautilus / gvfs can go beyond smb1 to smb3 in which case neither method would have worked without changing some configuration.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »