CIFS mounts hang on read

I would highly suggest AutoFS. This will dynamically mount and unmount your network shares in the background, all transparent to the user. I used to have problems with unmounting and remounting mobile devices until I made the switch. Unfortunately, there are far too many guides which overly complicate autofs setup. Assuming you’re on an Ubuntu … Read more

How do I find out what version of SMB is in use by each attached client to a Windows Server 2016?

I did find a way to do this. Hopefully this helps someone else looking for the same information. On the server, open a powershell then enter this command: Get-SmbSession | Select-Object -Property ClientComputerName,ClientUserName,Dialect For more verbose output: Get-SmbSession | Select-Object -Property *

Mount CIFS share with autofs

There should be an /etc/auto.smb already, use that, and add the following line to /etc/auto.master: /cifs /etc/auto.smb –timeout=60 Now all cifs shares will show up under /cifs: ls /cifs/<server> will show all the shares available. You might want to put some options in /etc/auto.smb to mount with specific modes. I have a auto.smb that I … Read more

CIFS mount in fstab succeeds on IP, fails on hostname written in /etc/hosts

By default, the samba (cifs) package on some distributions doesn’t use the hosts file to resolve the name. Instead, it uses the NetBIOS name to resolve to the IP. There are two ways to go about this: Set samba to use the hosts file for resolution. In your smb.conf file, find and modify or create … Read more

Mount CIFS Credentials File has Special Character

I have the same problem because my password contain comma symbol (i.e. “PASS,WORD”): $ sudo mount -t cifs -o domain=mydomain,username=myuser,password=PASS,WORD //server/share localfolder mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) At first, you should try enable verbose mode (–verbose option): $ sudo mount -t cifs -o domain=mydomain,username=myuser,password=PASS,WORD //server/share localfolder –verbose … Read more