nvertigo21
Cadet
- Joined
- Dec 9, 2014
- Messages
- 5
I thought I would post this problem and solution in case someone else ran into the same problem as me. I use autofs on some of my linux client machines to automatically mount cifs shares hosted on my freenas box. Under 11.1-U6, the NT1 protocol was disabled and what this meant was that my autofs shares refused to mount, so when I upgraded I had a bunch of things broke that worked fine under 11.1-U5. I believe there's a way to reenable the NT1 protocol, but I decided I'd rather move to SMB3 in the name of security and performance.
I searched but could not come across a solution, so I started poking around in the /etc/auto.smb file which is installed as part of autofs. After making the following changes, I was able to get my linux clients to mount the freenas cifs shares and everything seems to be working great. From what I can tell, the reason you need to make both of changes below is that the script first uses smbclient to test the connection before it mounts the drive later on.
Edit auto.smb:
and also change
Restart autofs and change to your mount directory and it should be good. After you cd into your mount directory, you can confirm that version 3 of the protocol is being used.
Hope that helps. Autofs is great!
Edits: typos
I searched but could not come across a solution, so I started poking around in the /etc/auto.smb file which is installed as part of autofs. After making the following changes, I was able to get my linux clients to mount the freenas cifs shares and everything seems to be working great. From what I can tell, the reason you need to make both of changes below is that the script first uses smbclient to test the connection before it mounts the drive later on.
Edit auto.smb:
opts="-fstype=cifs,vers=3.0"
and also change
smbopts="-A $creds -m SMB3"
Restart autofs and change to your mount directory and it should be good. After you cd into your mount directory, you can confirm that version 3 of the protocol is being used.
$ sudo systemctl restart autofs
$ cd /cifs/freenas/photos
$ mount
//freenas/photos on /cifs/freenas/photos type cifs (rw,relatime,vers=3.0,sec=ntlmssp,cache=strict,username=pms,domain=FREENAS,uid=1001,forceuid,gid=111,forcegid,addr=x.x.x.x,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
Hope that helps. Autofs is great!
Edits: typos