Raspberry Pi Server For Mac And Windows
Summary I am attempting to mount remote shares from a Windows 2016 Server with required credentials onto a Raspbian directory. SMB Protocol Mounting with mount command and cifs.utils I want to connect via the SMB2.0 or later protocol. Windows Server 2016 does not explicitly state anywhere in its UI what version it is running (Gee thanks, Micro$oft). On Raspbian, I have added an entry to the /etc/fstab file to mount the share to a local directory. //192.168.1.31/ /home/pi/windowsshare/ cifs credentials=/home/pi/.smbcredentials,vers=2.0,sec=ntlm,iocharset=utf8 0 0 It uses this credentials file (.smbcredentials): username=Administrator password=[REDACTED] domain=AASERVER-1 I am unclear what 'domain' means in this context. Domain and server are the same thing to me. I put the server name in the domain field, as I assume that the credentials parser will attempt to locate the user Administrator registered on machine AASERVER-1.
Mar 27, 2018 - This article covers setting up the Raspberry Pi 3 Model B+ for headless SSH access over WiFi using a Mac or Windows 10. If you would like to.
Most other network tools simply allow specifying the user as AASERVER-1/Administrator. I need clarification on whether I should be using this field. After running mount -a to mount shares listed in /etc/fstab, I ran into mount error(22): Invalid argument. I ran dmesg to check the system log.
Dmesg output: CIFS VFS: Unable to select appropriate authentication method! CIFS VFS: Send error in SessSetup = -22 CIFS VFS: cifs_mount failed w/return code = -22 I got rid of the sec=ntlm option, and it failed again. Dmesg: CIFS VFS: session b9093700 has no tcon available for a dfs referral request CIFS VFS: cifs_mount failed w/return code = -22 Next I got rid of the vers=2.0 option. Failed again. Dmesg: No dialect specified on mount.
Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount. CIFS VFS: session b030a800 has no tcon available for a dfs referral request CIFS VFS: cifs_mount failed w/return code = -22 Apparently the version needs to be explicitly declared, so removing this option did not improve my results.
I also tried ntlm, ntlmssp, and ntlmsspi authentication protocols (options listed in man mount.cifs are ntlm, ntlmi, ntlmv2, ntlmv2i, ntlmssp, ntlmsspi) Testing server configuration Since Windows Server 2016 does not explicitly state anywhere in its configuration program what version of SMB is being used, I used this command in PowerShell: Get-SmbServerConfiguration Select EnableSMB2Protocol It returns True, which means SMBv2.0 is running (but this does not guarantee that a newer version is not running, afaik). Testing SMB configuration with smbclient I downloaded smbclient to test the SMB protocol just to rule out the possibility of network configuration errors causing this problem.